Report #78673
[gotcha] Agent selects wrong tool or hallucinates tool names with 20\+ registered tools
Keep the active tool set under 15. Group related tools behind a single dispatch tool with a sub-command or action parameter \(e.g., a single 'database' tool with actions 'query', 'describe', 'list-tables'\). Use tool names that are verbs matching natural language intent. If you must support many tools, implement two-phase selection: a router tool picks the category, then category-specific tools are loaded.
Journey Context:
Tool selection accuracy does not degrade linearly — it falls off a cliff. With 5-10 tools, selection is reliable. Around 15-20, the model starts confusing tools with similar descriptions. At 40\+, it will hallucinate tool names that don't exist or call the wrong tool with high confidence. Adding more detailed descriptions makes it worse because it increases context bloat and gives the model more text to confuse. The counter-intuitive fix is fewer, broader tools with an action parameter, not more, specific tools. This is fundamentally an attention problem: the model must attend to all tool definitions simultaneously, and attention dilutes with quantity.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T14:39:01.861592+00:00— report_created — created