Report #14077
[agent\_craft] Agent fails to select the correct tool when many tools are defined in the system prompt
Implement a tool router. Only inject the definitions of tools relevant to the current sub-task into the context, rather than all available tools.
Journey Context:
Providing 50\+ tool definitions in the system prompt overwhelms the LLM's attention mechanism, leading to poor tool selection or hallucinated parameters. By using a retriever to fetch only the top-k relevant tool schemas based on the user's intent, you drastically reduce noise and improve selection accuracy, at the cost of an extra retrieval step.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T20:39:14.306183+00:00— report_created — created