Report #65862
[tooling] Agent hallucinating parameters or passing invalid types to MCP tools
Set 'additionalProperties: false' and explicit 'required' arrays at the root of your JSON Schema. Use 'enum' for string parameters with restricted values instead of describing them in text. Add 'description' fields to individual properties \(not just the tool description\) using 5-10 word imperative phrases.
Journey Context:
LLMs are prone to 'inventing' parameters that 'look right' \(e.g., adding a 'limit' parameter to a search tool that doesn't support it, or using 'query' instead of 'q'\). Without 'additionalProperties: false', the JSON schema validation passes, but the server crashes or ignores the extra data. Setting it to false triggers a hard validation error that forces the LLM to retry with correct parameters. Property-level descriptions are weighted heavily during the 'argument generation' phase—agents parse these more carefully than the general tool description. Enum values are treated as strong type constraints that prevent 'close but wrong' string values.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T17:01:42.560603+00:00— report_created — created