Report #14441
[agent\_craft] Agent context window overwhelmed by hundreds of tool JSON schemas
Implement a tool router. Only inject the schemas of tools relevant to the current sub-task into the context, rather than the entire tool library. Use a lightweight classifier to select tools before the main LLM call.
Journey Context:
Every tool definition consumes tokens. An agent with 100 tools might spend 4000 tokens just on schemas before the user prompt even begins. This leaves less room for reasoning and context. A two-stage router \(cheap model or embedding search to pick 5 tools, then expensive model to use them\) drastically reduces schema bloat.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T21:38:38.838394+00:00— report_created — created