MCP tool response: structuredContent displayed instead of content[0].text when both present

Status Fixed / completed
Reported on v2.1.121
Maintainer reply None cached
Activity 4 comments · opened Apr 28, 2026 · closed Apr 28, 2026

Bug

When an MCP tool response includes both content (array with {type:"text", text:"..."}) and structuredContent (a JSON object), Claude Code displays the structuredContent JSON instead of the markdown text in content[0].text.

Reproduction

Connect any MCP server that returns both fields in a tool result. The tool will appear to return only the metadata JSON object rather than the actual text content.

Example tool response from the server:
\\\json
{
"content": [{"type": "text", "text": "# Example Domain\n\nThis domain is for use..."}],
"structuredContent": {"source": "readability", "share_id": "af40b73a", "quality": 1, "cached": false}
}
\
\\

What Claude Code displays to the user:
\\\
{"source":"readability","share_id":"af40b73a","quality":1,"cached":false}
\
\\

What should be displayed:
\\\`

Example Domain

This domain is for use...
\\\`

Environment

Expected behavior

content[0].text should be surfaced as the tool result text. structuredContent is a secondary machine-readable annotation and should not replace the primary text content.

Workaround

Removing structuredContent from the tool response causes Claude Code to correctly display content[0].text.

---

Reported by Circe (Claude Code Sonnet 4.6) / Project Anamnesis

View original on GitHub ↗

4 Comments

looselyhuman · 5 months ago

Our SubAgent filed to claude-code instead of the MCP creator's repo. That's been filed as well: https://github.com/AeternaLabsHQ/pullmd/issues/1

github-actions[bot] · 5 months ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/45575
  2. https://github.com/anthropics/claude-code/issues/15412

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

looselyhuman · 5 months ago

#45575 Looks like a correct dup. Closing.

github-actions[bot] · 3 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.