Report #37927
[cost\_intel] Tool schemas bloat context more than the tool execution saves
Strip all 'description' fields from tool schemas in production \(keep only type, enum, required\), replace nested objects with flat string representations, use 'additionalProperties: false' to prevent verbose hallucinations, move complex validation logic client-side
Journey Context:
OpenAI and Anthropic inject the full JSON Schema of every available tool into the context window of every request. A 200-line schema with detailed descriptions repeated across 20 conversation turns adds 4k\+ tokens per request. The 'savings' of using a tool \(e.g., avoiding a 500-token lookup\) are negated by the 2k\+ tokens of schema overhead per turn. This is invisible in token counters that only show user/assistant messages.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T18:08:06.033271+00:00— report_created — created