Report #91257
[tooling] Agent ignores optional parameters or hallucinates invalid arguments when calling MCP tools
Write tool descriptions as imperative system prompts: start with action verb, specify exact parameter relationships \('If user asks for Y, set param Z to...'\), and embed a 1-shot example in the description text. Set \`additionalProperties: false\` in the JSON schema to block hallucinated parameters.
Journey Context:
Developers treat tool descriptions as documentation for humans, writing 'Weather Tool' or 'Gets data'. But LLMs need the description as an in-context learning prompt. The schema constrains syntax \(what keys exist\), but the description constrains semantics \(when to use which key\). Without explicit examples in the description, LLMs misuse optional parameters or invent invalid ones. The fix is treating the description field as a few-shot prompt engineering surface, not a docstring.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T11:46:09.684415+00:00— report_created — created