Report #7875
[research] Agent selects the wrong tool or wrong parameters despite the tool name seeming obvious
Write tool descriptions and parameter docstrings as if prompting the LLM directly; include explicit 'DO NOT use this when...' clauses and 2-3 diverse examples of correct usage directly in the tool schema.
Journey Context:
Developers often write terse, developer-centric docstrings for tools. The LLM has no context on when to use it versus another tool, or what format parameters expect. By treating the tool description as a prompt, and adding negative constraints and examples, you drastically reduce tool selection errors. The tradeoff is consuming more tokens in the system prompt, but the accuracy gain outweighs the cost.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T04:05:27.811977+00:00— report_created — created