◉CLAUDE LABJP
●CC 2.1.330 — No new release over the weekend; 2.1.330 is current and fixes "JSON schema is invalid" when the API rejects MCP tool schemas●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 7 days left. Move to claude-sonnet-5-5●CHROME — Users report Claude in Chrome failing on Authorize with "This isn't working right now"●NEW — New: Remote MCP hanging on expired auth? Check for mcp-remote first●EASEL — 2.1.330 adds easel, a built-in mod that draws charts on request. Turn auto charts off in /config●GEMINI 2.5 — Using Gemini 2.5 alongside Claude? From 12/1 requests reroute to newer models, billed at their rates●CC 2.1.330 — No new release over the weekend; 2.1.330 is current and fixes "JSON schema is invalid" when the API rejects MCP tool schemas●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 7 days left. Move to claude-sonnet-5-5●CHROME — Users report Claude in Chrome failing on Authorize with "This isn't working right now"●NEW — New: Remote MCP hanging on expired auth? Check for mcp-remote first●EASEL — 2.1.330 adds easel, a built-in mod that draws charts on request. Turn auto charts off in /config●GEMINI 2.5 — Using Gemini 2.5 alongside Claude? From 12/1 requests reroute to newer models, billed at their rates
Articles/API & SDK
⬡ API & SDK/2026-11-23Beginner

How Many Input Tokens Does One More Tool Add? Separate the Fixed Overhead From Each Tool's Weight With count_tokens

Passing tools adds a fixed, model-specific block of tokens on top of the definitions themselves. Here is a leave-one-out script for count_tokens, and how to read the shift when moving from Sonnet 4.5 to 5.5: the fixed part shrinks while the definitions grow.

claude-api85count_tokenstool-use25cost-managementpython-sdk

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.

ModelFixed overhead with tool_choice auto / none
Claude Opus 5.5286 tokens
Claude Sonnet 5.5286 tokens
Claude Haiku 5.5286 tokens
Claude Sonnet 4.6497 tokens
Claude Sonnet 4.5496 tokens
Claude Haiku 4.5496 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 overheadDefinitions (about +30%)Net change
500 tokens-210+150about -60
700 tokens-210+210about 0
3,000 tokens-210+900about +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.

Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

⬡ API & SDK2026-11-20
When the Claude API Only Says “Connection error.”, Follow the Exception Three Levels Down and Sort It Into Four Causes
The Python SDK raises the same APIConnectionError message for DNS, proxy, certificate, and timeout failures. Here is a script that walks __cause__, the real output from reproducing all four, and the order I fix them in.
⬡ API & SDK2026-05-26
Stabilizing Claude API Structured Responses in Production — Notes on tool_use, JSON Schema, and Layered Validation
Getting Claude to return JSON takes a few lines. Keeping that JSON usable in production is a different problem. Here is the layered design I landed on after running a wallpaper classification pipeline through Claude API, built around tool_use, JSON Schema, and domain validation.
⬡ API & SDK2026-05-22
Why tool_result could not be submitted Keeps Coming Back, and How to Build a Recovery Handler That Actually Holds
Run a Claude agent long enough and one day it starts: 'tool_result could not be submitted', back to back, and retries change nothing. The error message hides four completely different root causes. Here is what I learned debugging it on the always-on agent jobs I run as an indie developer, with the TypeScript recovery handler I now ship in production.