Tool responses with both content text and structuredContent: text is hidden

Resolved 💬 3 comments Opened Apr 9, 2026 by wayne5w Closed May 28, 2026

Summary

When an MCP tool response contains both content[0].text and structuredContent, Claude Code renders only the structuredContent JSON. The content[0].text is not displayed to the user, though the model does receive it.

Reproduction

  1. MCP tool handler returns:
return {
  content: [{ type: 'text', text: 'IMPORTANT INSTRUCTION\n\n---\n{"results":[...]}' }],
  structuredContent: { results: [...] }
};
  1. Claude Code displays the structuredContent as formatted JSON
  2. The "IMPORTANT INSTRUCTION" text in content[0].text is not visible

Expected behavior

Both should be visible, or at minimum the content[0].text should take priority since it's the primary content field in the MCP protocol. structuredContent is supplementary.

Workaround

Omit structuredContent when the text content contains important instructions that must be visible.

Impact

MCP servers that enrich tool responses with instructions (e.g., type schema guidance after issue creation) have those instructions silently hidden from the user. The model receives the text and can act on it, but the user has no visibility into what the model was told.

Environment

  • Claude Code CLI (latest)
  • macOS
  • MCP server: custom HTTP streamable transport

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗