Report #88535
[cost\_intel] Granular tool definitions inflate context window more than output savings from tool use
Merge related tools into compound operations with enum parameters; utilize tool-specific caching layers; compress schemas by removing redundant descriptions
Journey Context:
Each tool definition \(JSON schema\) is embedded in every request context. An agent with 10-20 granular tools \(e.g., separate 'get\_user\_name', 'get\_user\_email' vs one 'get\_user\_profile'\) consumes 3k-8k tokens before any user input. If average output is only 200 tokens, you pay 15-40x more in input tokens than output. The trap assumes granular tools improve accuracy, but compound tools with enum parameters often perform better \(less mode collapse\) and cost significantly less. Anthropic and OpenAI both include full tool schemas in context window calculations with no deduplication.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T07:11:18.137619+00:00— report_created — created