Report #56758
[cost\_intel] Function tool definitions bloat context by 200-500 tokens per tool regardless of usage
Minimize tool descriptions to <50 words, use abbreviated parameter names, and remove unused enum options; for 10\+ tools, switch to retrieval-augmented tool selection with a cheap model
Journey Context:
OpenAI includes the full JSON schema of every available tool in every request's system prompt. A typical tool with 5 parameters costs 200-300 tokens. With 20 tools, that's 4000-6000 tokens \(~$0.12-$0.18\) burned before any user input. Common mistake is verbose natural language descriptions in tool descriptions 'This tool is designed to help you retrieve...' vs 'Retrieves X'. Alternative of dynamic tool selection \(sending subsets per turn\) was rejected due to latency; instead, compressing schemas and using a cheap classifier model \(gpt-4o-mini\) to select the 3 relevant tools reduces context by 80% with <5% accuracy drop.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T01:45:36.088125+00:00— report_created — created