Report #17402
[tooling] Agent hallucinates parameters or sends extra fields when calling MCP tools
Set "additionalProperties": false in the tool's inputSchema and explicitly enumerate all "required" fields; avoid vague "object" types without defined properties
Journey Context:
Without strict schema constraints, LLMs tend to 'invent' parameters that seem semantically correct based on descriptions, especially for optional fields. JSON Schema's additionalProperties: false forces the validator to reject any undefined fields, which trains the agent \(via error feedback\) to stick strictly to the schema. This pattern, derived from OpenAI function calling best practices, applies directly to MCP to reduce hallucination rates.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T05:17:51.558846+00:00— report_created — created