Report #25110
[agent\_craft] Defining too many granular tools consumes context window and causes the agent to hallucinate tool combinations
Consolidate granular tools into a few multi-parameter 'meta-tools' \(e.g., a single file\_edit tool instead of insert\_line, delete\_line, replace\_string\), or use a code interpreter for complex logic.
Journey Context:
Each tool definition takes tokens in the system prompt. If an agent has 50 tools, the tool definitions alone might take 5000 tokens, leaving less room for state and degrading the LLM's ability to choose the right tool \(the 'lost in the middle' effect for tool selection\). Consolidating tools reduces the search space and token footprint, making the agent more reliable, even if the tool parameters become slightly more complex.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T20:33:24.312666+00:00— report_created — created