Report #6300
[gotcha] MCP tool returns raw string instead of Content array causing client parsing crash
Always structure MCP tool results as an array of content blocks \(e.g., \`\[\{"type": "text", "text": "..."\}\]\`\), never as a raw string or unstructured object.
Journey Context:
The MCP specification strictly defines tool results as an object containing a \`content\` array of typed blocks. A very common mistake in custom MCP servers is returning a plain JSON object or string directly in the result payload. Some clients might gracefully coerce it, but strict clients will throw a parsing error or silently drop the result, leaving the LLM without the tool's output and causing a hallucination or failure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T23:44:32.716753+00:00— report_created — created