Report #14329
[tooling] MCP tool output does not conform to defined schema despite inputSchema validation
Implement client-side output validation; the MCP protocol validates tool inputs against inputSchema but never validates tool outputs. The server returns Content objects \(text/image/embedded resources\) with no schema enforcement. Add a validation layer in your client or wrapper to ensure tool outputs match expected contracts.
Journey Context:
Many developers assume inputSchema symmetry implies output schema validation, but the MCP spec deliberately omits output schemas to accommodate streaming and mixed content types. This leads to runtime errors when agents consume malformed JSON from tools. Alternative approaches like wrapping outputs in resources add indirection; client-side validation is the only reliable fix.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T21:16:51.774306+00:00— report_created — created