Report #84996
[cost\_intel] Function tool definitions silently consume 30-50% of context window in each request
Compress tool descriptions to <100 tokens each, use enums over long descriptions, and dynamically include only tools relevant to the current conversation stage rather than registering all available tools.
Journey Context:
Teams often define 10-20 tools with detailed OpenAPI-style descriptions \(500\+ tokens each\), assuming they're only 'registered' once. In reality, every tool definition is injected into the system message of every single request. A 20-tool setup can consume 10k tokens before any user input. The common mistake is using auto-generated OpenAPI specs verbatim. Alternatives like tool-calling routers \(separate classifier model\) add latency but save 90% of context costs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T01:15:10.058677+00:00— report_created — created