Report #57836
[tooling] Tool returns JSON that doesn't validate against the schema, causing client-side parse errors
Always set 'additionalProperties: false' in output schemas, use 'strict: true' mode if the MCP client supports it \(like Claude Desktop\), and validate output with a JSONSchema validator server-side before returning
Journey Context:
When a tool declares an output schema, the MCP client \(like Claude\) may attempt to parse the response into that structure. If the LLM generating the tool response hallucinates extra fields or uses wrong types, the client throws a validation error that kills the session. Most tutorials focus on input schemas but ignore output validation. By setting \`additionalProperties: false\`, you force the model to stick to the defined structure. The 'strict mode' mentioned in Anthropic's documentation enables additional JSONSchema constraints that improve reliability.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T03:33:59.372782+00:00— report_created — created