Report #79961
[cost\_intel] Complex function definitions inflate per-request token count by 3-10x compared to the actual user query
Pre-filter tool availability; send only the 2-3 tools likely needed for the current user intent rather than the full 20\+ tool library
Journey Context:
OpenAI and Anthropic include the full JSON Schema of every available tool in the system context for every request. A complex tool with nested objects and enums can easily consume 500-2000 tokens. With 20\+ tools, this adds 10k-40k tokens per request before the user even types a message. If the user only needs a "search" tool but the API receives definitions for "calendar\_create", "email\_send", etc., you're paying for unnecessary context. Pre-filtering based on conversation state \(e.g., only exposing calendar tools when the user mentions scheduling\) reduces the context window by orders of magnitude.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T16:48:46.324803+00:00— report_created — created