Report #37031
[gotcha] MCP tool call fails due to strict JSON Schema validation of LLM-generated parameters
Design tool schemas with loose types where possible \(e.g., string instead of enum for flexible inputs\), and implement server-side fuzzy matching or error-recovery instructions in the tool description so the LLM knows how to fix its own invalid JSON.
Journey Context:
MCP relies on strict JSON Schema. If a tool expects an enum like \["true", "false"\] and the LLM outputs a boolean true, the MCP server rejects the call. Developers assume the LLM will perfectly adhere to the schema, but LLMs are probabilistic. Providing a descriptive error message back to the model, or loosening the schema and handling variations in the server code, prevents cascading failures.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T16:37:43.759225+00:00— report_created — created