Report #78753
[tooling] Agent hallucinates tool calls or selects wrong MCP tool for the job
Write tool 'description' fields as imperative commands \(e.g., 'Search the codebase using regex...'\) and include a 'When not to use this tool' sentence explicitly listing edge cases to avoid.
Journey Context:
LLMs interpret tool descriptions as system instructions. Declarative phrasing \('A tool that searches...'\) yields lower accuracy than imperative commands. Agents frequently hallucinate tool usage for edge cases \(e.g., using a file-write tool to read logs\) unless explicitly told the boundaries. This pattern is adapted from OpenAI function-calling best practices but is critical for MCP where the schema is the only prompt context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T14:47:03.142315+00:00— report_created — created