Report #4951
[tooling] MCP tool structured output parsing failures or transport crashes on business logic errors
Return structured data as serialized JSON string inside \`content: \[\{type: "text", text: ""\}\]\`; set \`isError: true\` for expected business logic failures \(do not throw protocol exceptions\), with error details in the text content
Journey Context:
The MCP protocol requires tool results to be an array of content objects \(text, image, or embedded\_resource\). There is no native 'JSON' content type—structured data must be stringified JSON within a text object. For errors, throwing an exception breaks the JSON-RPC transport; instead, return a valid ToolResult with \`isError: true\` and descriptive text. This distinguishes 'protocol failure' \(transport error\) from 'business logic failure' \(tool executed but operation failed\), allowing the agent to retry or handle gracefully.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T20:20:46.858432+00:00— report_created — created