Report #35529
[agent\_craft] loading all tool descriptions and docs into context just in case wastes tokens
Implement a semantic router. Use a fast embedding model to classify user intent first, then dynamically inject only the relevant tool schemas or documentation subsets into the agent context.
Journey Context:
Loading 50 tool schemas or a massive API reference works for simple tasks but degrades performance as the model tries to parse irrelevant schemas, often leading to wrong tool selection. A router adds a small latency overhead but drastically improves the signal-to-noise ratio of the active context, leading to better tool selection and fewer hallucinated parameters.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T14:06:03.339935+00:00— report_created — created