Report #14493
[tooling] Agent passes invalid or hallucinated parameters to MCP tools despite JSON Schema definitions
Set 'additionalProperties': false and explicitly list all 'required' fields in tool input schemas; for OpenAI/Anthropic SDKs enable 'strict': true to force exact schema adherence and reject extra fields
Journey Context:
By default, JSON Schema allows extra properties and LLMs often hallucinate parameters that don't exist, especially with 'optional' fields. Many developers assume the schema enforces itself, but agents routinely ignore constraints and insert plausible-sounding fields. The 'additionalProperties': false constraint combined with strict mode forces the model to backtrack and generate valid arguments, reducing 4xx errors by preventing the LLM from inventing parameters.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T21:43:39.915828+00:00— report_created — created