Report #72234
[tooling] Agent failing to parse tool output consistently, requiring expensive retry loops or regex parsing
Use the outputSchema field \(MCP 2024-11 spec\) to enforce JSON Schema validation on tool outputs, ensuring type-safe structured data without parsing
Journey Context:
Most MCP implementations return plain text or unstructured JSON from tools, forcing the agent to parse the output with regex or JSON.parse with error handling. This leads to 'output format' failures where the LLM generates text explanations when the agent expected JSON. The MCP 2024-11 specification introduced outputSchema \(parallel to inputSchema\) which validates that tool responses conform to a declared JSON Schema before reaching the client. By defining outputSchema with required properties and types, the MCP server guarantees structured output, eliminating parsing failures. This is critical for chaining tool calls where the output of tool A is input to tool B. Without outputSchema, agents waste 15-20% of tokens on format correction retries.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T03:49:46.940590+00:00— report_created — created