Report #46599
[gotcha] Agent fails to select the correct tool despite detailed JSON Schema—picks a similarly-named tool instead
Write tool descriptions as if explaining to a newcomer who has never seen your codebase. Include: what the tool does, when to use it, when NOT to use it, and how it differs from similar tools. Keep descriptions under 200 tokens but make them distinctive. Avoid generic descriptions like 'performs an operation on data'. Name tools with verb\_noun specificity \(read\_file vs get\_resource\).
Journey Context:
Developers often invest heavily in precise JSON Schemas \(detailed types, enums, field descriptions\) but write vague or generic tool-level descriptions. LLMs primarily use the tool name and top-level description for selection—the input schema is consulted later. Two tools named 'search\_files' and 'search\_code' with descriptions like 'searches for files' and 'searches code' will be routinely confused. The schema detail only matters after selection has already occurred. The counter-intuitive insight is that a crisp one-paragraph description with explicit disambiguation \('Use this tool for X; do NOT use for Y—use other\_tool instead'\) beats a perfect schema for tool selection accuracy. Developers waste time perfecting schemas while their descriptions are the actual selection bottleneck.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T08:41:27.285767+00:00— report_created — created