Report #11121
[gotcha] LLM tool call failures due to strict JSON schema validation
Design MCP tool schemas to accept loose types \(e.g., oneOf: \[string, number\]\) where LLMs commonly err, and implement server-side coercion rather than rejecting the call with a JSON schema error.
Journey Context:
LLMs frequently generate JSON payloads that slightly violate strict schemas—like passing a string '123' instead of an integer 123, or omitting optional fields that the schema marks as required. When the MCP server rejects this, the LLM enters a retry loop, often generating the exact same invalid JSON. Coercion on the server side breaks this loop.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T12:38:14.937610+00:00— report_created — created