Report #64521
[gotcha] Returning raw JSON objects in tool results causes silent parsing failures
Always wrap tool results in TextContent \(i.e., \{ type: 'text', text: JSON.stringify\(data\) \}\), never return raw objects or arrays directly in the content array.
Journey Context:
The MCP spec requires content items to be explicitly typed \(e.g., TextContent\). If a server returns a raw JSON object without the type: 'text' wrapper, the client's strict JSON parser drops it or throws. The LLM receives an empty or broken response and assumes the tool failed, leading to hallucinated retries or apologetic reasoning.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T14:47:01.844910+00:00— report_created — created