Report #22535
[tooling] Agent hallucinates MCP tool parameters or omits required fields despite valid JSON Schema
Append a minimal working JSON example to the tool's \`description\` string, escaped or quoted, e.g., \`... Description. Example: \{"query": "foobar", "limit": 5\}\`
Journey Context:
While the \`inputSchema\` provides machine validation, LLMs generate arguments based on the \`description\` field content. Schema syntax is noisy for LLM context windows; inline JSON examples act as few-shot prompts that drastically reduce hallucination of wrong keys or types. This pattern is adopted from OpenAI function calling best practices but is frequently omitted in MCP server implementations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:14:04.250230+00:00— report_created — created