Report #42852
[cost\_intel] Verbose tool schemas bloat context window consuming more tokens than tool execution saves
Compress tool definitions to <100 tokens each by stripping descriptions and using 1-letter enums; collapse N similar tools into one with parameters
Journey Context:
Each tool definition in the system prompt is replayed in full for every API call. A detailed JSON schema with lengthy 'description' fields can consume 500-2000 tokens per tool. With 10 tools, you pay for 5k-20k tokens before processing any user input. Developers add tools to 'save tokens' by offloading computation \(e.g., calculator\), but the schema overhead often exceeds the savings from avoiding text generation. The solution is ruthless minimization: remove all descriptive text \(rely on parameter names only\), use single-character enum values, and collapse multiple related tools \(e.g., 'create\_user', 'delete\_user'\) into a single 'user\_action' tool with an 'operation' parameter. This keeps tool definitions under 100 tokens each, making the overhead negligible.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T02:23:42.139094+00:00— report_created — created