I was about to add one more tool to a small script that summarizes my wallpaper app's store reviews by language. Before adding it, I wanted to know how much heavier a single tool would make each request.
My first move was to compare a request with one tool against a request with none, and treat the difference as "the weight of one tool." I multiplied that by the number of tools I planned to have, and the estimate came out surprisingly high.
When I went back to the docs, I realized most of that difference was not the tool definition at all. The first tool brings a fixed overhead along with it, and unless you count that separately, every estimate stays off by that amount.
Passing tools adds a fixed block of tokens, separate from the definitions
The Pricing section of the tool use docs lists, per model, the tokens of the system prompt the API adds automatically when you pass tools. It appears as soon as you pass at least one tool, and not at all when you pass none.
| Model | Fixed overhead with tool_choice auto / none |
|---|---|
| Claude Opus 5.5 | 286 tokens |
| Claude Sonnet 5.5 | 286 tokens |
| Claude Haiku 5.5 | 286 tokens |
| Claude Sonnet 4.6 | 497 tokens |
| Claude Sonnet 4.5 | 496 tokens |
| Claude Haiku 4.5 | 496 tokens |
With tool_choice set to any or tool, the overhead is a little higher on many models (406 tokens on Haiku 5.5). It varies by model, so checking the one row you actually use is enough.
So your input splits into three parts: the messages, the fixed overhead, and the sum of the tool definitions. The "zero tools versus one tool" gap I was looking at was the fixed overhead plus the first definition.
A script that removes one tool at a time
count_tokens takes the same input shape as the Messages API and returns the input token count before you send anything. It is free to use, with only a requests-per-minute limit. The idea is to start from "all tools" and treat the drop you see when removing a single tool as that tool's weight.
import json
import sys
import time
import anthropic
MODEL = "claude-sonnet-5-5"
PRICE_PER_MTOK = 2.00 # Sonnet 5.5 base input price (USD per million tokens)
PROBE = [{"role": "user", "content": "ping"}] # Any content works; keep it identical across counts
def count(client, tools):
kwargs = {"model": MODEL, "messages": PROBE}
if tools: # With zero tools, omit the parameter instead of sending an empty list
kwargs["tools"] = tools
n = client.messages.count_tokens(**kwargs).input_tokens
time.sleep(0.3) # count_tokens is free, but rate limited per minute
return n
def measure(client, tools):
base = count(client, [])
full = count(client, tools)
rows = []
for i, tool in enumerate(tools):
rest = tools[:i] + tools[i + 1:]
rows.append((tool["name"], full - count(client, rest))) # How much removing this one saves
fixed = full - base - sum(w for _, w in rows)
return base, full, fixed, rows
if __name__ == "__main__":
tools = json.load(open(sys.argv[1], encoding="utf-8"))
base, full, fixed, rows = measure(anthropic.Anthropic(), tools)
print(f"no tools: {base} / all {len(tools)} tools: {full} / added: {full - base}")
print(f"fixed overhead (comes with the first tool): {fixed}")
for name, w in sorted(rows, key=lambda r: -r[1]):
print(f" {name:<24} {w:>6} tokens ${w * 1000 * PRICE_PER_MTOK / 1e6:.3f} per 1,000 calls")Dump the array you normally pass as tools into a JSON file and run python3 tool_weight.py tools.json. For N tools it makes N+2 calls.
Why remove one at a time rather than count each tool alone? A single-tool request always includes the fixed overhead, while the difference between "all" and "all minus one" never does. If the leftover fixed value lands close to the table above, that is a good sign the arithmetic is right.
Before touching the API, I ran it against a fake client that simply adds 286 whenever tools are present, and checked that fixed came back as 286. You can confirm the logic without spending anything.
Three things I watch while counting
First, count against the same model ID you run in production. The token counting docs say Claude 4.7 and later models use a newer tokenizer that produces roughly 30 percent more tokens for the same text. Reusing counts from an older model makes your definitions look lighter than they are.
Second, the number is an estimate. The docs note it can differ slightly from the real request, and that tokens added by the system may appear in the count without being billed. I use it for order of magnitude and ranking, and reconcile billing against the usage field of real responses.
Third, some inputs can't be counted. Requests with server tools such as web search, or with the MCP connector, return an error from count_tokens (the advisor tool is the exception). For those, the only option is to send the real request once and read usage.
Moving from Sonnet 4.5 to 5.5: the fixed part shrinks, the definitions grow
With claude-sonnet-4-5-20250929 retiring on November 30, many of you will switch to claude-sonnet-5-5. When you do, the tool-related part of your input moves in two directions at once.
The fixed overhead drops from 496 to 286, which is 210 tokens less per request. Meanwhile your tool definitions, recounted with the newer tokenizer, grow by roughly 30 percent. If your definitions total x tokens, you gain 0.3x and lose 210, so once the definitions pass roughly 700 tokens, the tool-related input gets heavier after the move.
| Definitions before (approx.) | Fixed overhead | Definitions (about +30%) | Net change |
|---|---|---|---|
| 500 tokens | -210 | +150 | about -60 |
| 700 tokens | -210 | +210 | about 0 |
| 3,000 tokens | -210 | +900 | about +690 |
The 30 percent is the docs' rough figure and depends on your text. That is exactly why I'd rather run the script twice, switching MODEL between the old and new IDs, and look at the difference for my own definitions. Sonnet 5.5 also has a lower per-token price, so more tokens doesn't automatically mean a bigger bill.
I wrote up how I find the model IDs to replace in Counting Sonnet 4.5 callers from the Usage CSV instead of grep.
When a tool turns out heavy, trim the description first
Once the per-tool weights are in a list, it becomes clear where to start. In my case the heavy part was usually the description, not the input_schema. I had kept adding helpful usage notes, and at some point even example sentences.
I keep one rule for trimming: keep the words the model needs to decide whether to call the tool, and move anything about what happens after the call into the result. Separating what it reads before the call from what you return after it noticeably cuts what you send every time.
If a tool stays heavy after that, you can stop sending it on every request and pass it only when it's needed. I covered pairing that with tool_choice in Reducing wasted reasoning with tool_choice in the Claude API, and the basics of token counting in Claude API Token Counting.
Start by dumping your current tools and running it once
What worked for me was simply writing the array I already pass as tools to a JSON file and running the script once. After checking that fixed is close to the table, all that's left is reading down the list from the heaviest tool.
Every time I add a tool, I ask with a number whether it's worth sending on every request. As an indie developer running small systems, that check is the one that pays off most for me.