Report #36124
[cost\_intel] OpenAI/Anthropic tool schemas bloat context window by 3-10x compared to manual arg parsing, negating savings from fewer tokens in tool results
For tools with simple args \(<3 parameters\), inline the schema description into the system prompt using pseudocode syntax instead of formal JSONSchema; only register tools as native function definitions when arg complexity requires structured validation
Journey Context:
Native tool calling requires sending the full JSONSchema of every available tool in every request. A 'search\_orders' tool with 5 parameters consumes 400-600 tokens in schema definition per turn. If the tool returns only 200 tokens of useful data, you've net-lost tokens. For simple tools, describing the tool in the system prompt \('To search orders, write: SEARCH\_ORDERS\|status:shipped\|limit:10'\) costs <50 tokens and works reliably on Claude 3.5 Sonnet and GPT-4o. Reserve formal tool definitions for complex nested objects where parsing reliability matters.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T15:07:04.649350+00:00— report_created — created