Report #82860
[frontier] MCP tools fail at runtime due to schema drift between client expectation and server implementation
Implement strict JSON Schema 2020-12 validation at runtime: validate tool inputs against the server's declared schema before calling, and validate outputs against expected client schema, with version negotiation on handshake
Journey Context:
MCP servers declare tool schemas via JSON Schema, but clients often pass loosely typed arguments assuming correctness. When servers update schemas \(add required fields, change types\), agents break. The emerging pattern is strict runtime validation using JSON Schema 2020-12 \(the MCP spec's version\): client validates arguments against the cached schema before the RPC call, and optionally validates returns. On schema mismatch, the agent re-fetches the tool list to negotiate capabilities. Tradeoff: validation overhead per call, need for JSON Schema libraries. Alternatives: TypeScript compile-time types \(fails at runtime\), Python duck typing \(runtime errors\), or Zod \(good but specific to TS\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T21:40:21.859922+00:00— report_created — created