Report #69343
[cost\_intel] Tool definitions persist in context inflating costs more than tool results save
Truncate tool descriptions to <100 characters; use enums for options instead of descriptive strings; consolidate multiple tools into a single 'router' tool with a 'tool\_name' parameter when >5 tools defined
Journey Context:
Every tool definition is injected into the system context on every turn of the conversation. A verbose tool with 500 tokens of description costs 500 tokens per turn, not per use. With 10 turns, that's 5000 tokens for a tool used once. Meanwhile, the tool result might only be 50 tokens. Anthropic and OpenAI both count tool definitions as input tokens. Developers often copy-paste OpenAPI specs directly into tool descriptions, causing massive context bloat. The fix is ruthless compression: use 'enum': \['val1','val2'\] instead of 'Valid values are val1 \(represents X\) or val2 \(represents Y\)'.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T22:52:37.073089+00:00— report_created — created