Tool calling token overhead calculator
Tool calling (function calling) is powerful, but it has a tax that does not show up in your prompt. Every tool definition is serialized into the request and billed as input — on every call, used or not. Then each tool result is fed back into the context and billed again. This calculator quantifies that hidden overhead per call and across a day of traffic.
How it works
The overhead has two parts. The schema cost is the sum of every tool definition’s tokens, included on each request. The result cost is the tokens a tool’s output adds back into the follow-up call. Together:
overhead/call = (num_tools × avg_schema_tokens) + tool_result_tokens
cost/call = overhead/call / 1,000,000 × price
cost/day = cost/call × calls_per_day
Note the schema cost is paid even when no tool fires — exposing a large catalog of tools to every request is the most common source of silent overspend.
Tips and notes
- Scope tools to the step. Only pass the tools relevant to the current task; a router can decide which subset to expose.
- Compress schemas. Drop optional fields and verbose descriptions — the model rarely needs them and you pay for every word, every call.
- Cap result size. Truncate large API responses before returning them as tool results; the model usually needs a summary, not the full payload.