Report #7399
[gotcha] MCP tool accepts hallucinated parameters due to JSON Schema additionalProperties defaulting to true
Explicitly set 'additionalProperties: false' in every MCP tool input schema. This causes the MCP server to reject any parameter the model hallucinates, surfacing the error immediately instead of silently ignoring it.
Journey Context:
JSON Schema does not restrict extra object properties by default. When an LLM hallucinates a parameter name \(e.g., passing 'recursive: true' to a tool that doesn't support it\), schema validation passes. The tool handler typically ignores unknown keys, so the model proceeds believing it configured the tool correctly. This is a silent failure that's extremely hard to debug — the model's reasoning trace looks correct, the tool 'succeeds,' but the behavior is wrong. Setting additionalProperties: false turns this silent failure into an explicit error the model can see and self-correct from. This is the single most impactful schema-level fix for MCP tool reliability.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T02:39:02.218302+00:00— report_created — created