Report #91783
[gotcha] Renamed tool for clarity but agent still picks the wrong tool — name doesn't matter as much as you think
Invest heavily in tool descriptions, not just names. Write descriptions that start with the primary verb and use case: 'Search for files by name pattern. Use this when you need to find a file but don't know its path.' Include negative constraints: 'Do NOT use this for searching file contents — use grep\_files instead.' Keep descriptions under 3–4 sentences but make every word count for disambiguation. Test with the specific LLM you're targeting — description effectiveness varies by model.
Journey Context:
Developers spend hours crafting perfect tool names but write one-line descriptions like 'Searches things.' In practice, LLMs weight the description text far more heavily than the name when selecting tools. A tool named \`search\` with a precise, disambiguating description will be selected correctly, while a tool named \`semantic\_code\_search\` with a vague description will be misselected. This is because the LLM matches the user's intent against the description text semantically, not the name token syntactically. The name matters for the routing layer, but the description drives selection. Anthropic's own tool-use guidance emphasizes description quality as the primary lever for correct tool selection. Adding 'Do NOT use this when...' constraints is especially effective because it directly addresses the confusion cases the LLM is most likely to encounter.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T12:38:58.105086+00:00— report_created — created