NEWVectors or files. Pick a path.Start →
    Agent Perception
    7 min read
    Updated 2026-10-22

    Why Is My AI Agent Using Thousands of Tokens Before I Ask It Anything?

    Every MCP server you connect sends its full tool list with every request, and the schemas cost more than the descriptions. We counted the tokens for Mixpeek's own MCP server (68,605 for all 67 tools) and Google's official Google Ads MCP server (3,668 for 3 tools), and show how to cut the bill.

    MCP
    AI Agents
    Tokens
    Context Window
    Advertising Agents
    Tool Use
    First-Party Data

    Why is my AI agent using thousands of tokens before I ask it anything?



    Every MCP server you connect hands the model its whole tool list, and most clients send that list with every request. Each tool brings a name, a description and a JSON schema for its inputs, and the schema is usually the expensive part. Connect a few large servers and the model reads tens of thousands of tokens of tool definitions before it reads your question.

    We measured it on 2026-10-22. Mixpeek's full MCP server adds 68,605 input tokens to every request, for 67 tools. Google's official Google Ads MCP server adds 3,668, for 3 tools. The fixes are to connect fewer tools, shrink the schemas, or let the model search for tools and load only the ones it needs.

    How many tokens does each MCP server add to a request?



    First-party measurement, run 2026-10-22 with Anthropic's token counting endpoint on claude-sonnet-5-5. Each row is the token count of a request with the server's tools minus the same request without them.

    MCP serverToolsInput tokens added per requestTool list size (JSON)
    Mixpeek, full server (mcp.mixpeek.com/mcp)6768,605186 KB
    Mixpeek, ingestion scope2732,04186 KB
    Mixpeek, admin scope2324,40366 KB
    Mixpeek, retrieval scope1918,15148 KB
    Google Ads MCP (official, default config)33,6688 KB


    How we counted. The Mixpeek lists came from tools/list on the public endpoints. The Google Ads list came from running the open-source server at its 2026-10-09 commit with its bundled tool configuration. Any request that carries at least one tool also pays a fixed 315 tokens, which is included in every row above. Your own client may format tools differently, so treat the numbers as the size of the definitions, measured the same way for every server.

    Where do the tokens go?



    Into the input schemas. Across Mixpeek's 67 tools, the tool descriptions are 3% of the bytes and the schemas are the rest. Counted one tool at a time, the median tool costs 530 tokens, the smallest 157 and the largest 5,172. The ten largest tools carry 51% of the total.

    The largest is list_storage_connections, a read that takes a few filters. One of those filters, provider_type, carries a 10,774-byte description of every storage provider Mixpeek supports, copied in from the server's code. The model pays for that text on every request whether or not it ever lists a storage connection. That is a common pattern: a schema generated from code inherits every docstring, enum note and nested object the code has.

    Google's Google Ads server shows the other shape. Its search tool has a small schema and a 5,807-character description that teaches the model how to write a Google Ads Query Language query. Those tokens do work on every call, because the tool is useless without them.

    How many tokens would a large advertising MCP server cost?



    Multi-platform advertising servers ship far more tools. Adspirer's FAQ lists 405 tools across Google, Amazon, LinkedIn, Meta, TikTok and ChatGPT Ads. We did not measure that server. As arithmetic only: at the 530-token median we measured on Mixpeek's tools, 405 tool definitions sent up front would come to roughly 215,000 tokens per request. Check what your client actually loads before you connect several of these at once.

    Anthropic's tool search documentation puts a typical five-server setup (GitHub, Slack, Sentry, Grafana and Splunk) at about 55,000 tokens of definitions, and says Claude's ability to pick the right tool degrades past 30 to 50 available tools. So a large tool list costs you twice: once in tokens, and again in wrong tool calls.

    How do I cut the tokens my agent spends on tools?



    1. Connect only the servers this agent needs. A reporting agent does not need the server that creates campaigns. Many servers offer scoped endpoints or a config file that turns tool groups off; Google Ads MCP has tools_config.yaml, and Mixpeek has separate ingestion, retrieval and admin endpoints. 2. Pick the scope by the job. In our table, an agent that only searches a Mixpeek library pays 18,151 tokens on the retrieval endpoint against 68,605 on the full server, 74% less. 3. Defer loading. With Claude's tool search tool, you mark tools defer_loading: true and the model searches the catalog and loads up to 5 matches by default. Anthropic reports this typically cuts definition tokens by over 85 percent. For MCP servers connected through the MCP connector, set it once on the toolset's default_config. 4. If you write the server, shrink the schemas. Move long explanations out of parameter descriptions into docs, replace a long enum note with the enum values, and drop parameters that are aliases of each other. Measure each tool alone, as below, and fix the largest first. 5. Cache the prefix. Tool definitions sit at the front of the prompt, so prompt caching makes the repeated tokens cheaper on later turns. It does not make them shorter, and the model still has to choose among them.

    How do I measure my own MCP server's token cost?



    Fetch the tool list from your server, then ask the counting endpoint for the difference with and without it. The endpoint is free to call.
    import json, os, urllib.request
    
    def count(tools=None):
        body = {"model": "claude-sonnet-5-5",
                "messages": [{"role": "user", "content": "Which campaigns spent the most last week?"}]}
        if tools:
            body["tools"] = tools
        req = urllib.request.Request(
            "https://api.anthropic.com/v1/messages/count_tokens",
            data=json.dumps(body).encode(),
            headers={"x-api-key": os.environ["ANTHROPIC_API_KEY"],
                     "anthropic-version": "2023-06-01", "content-type": "application/json"})
        return json.load(urllib.request.urlopen(req))["input_tokens"]
    
    # tools/list result from your MCP server
    mcp_tools = json.load(open("tools.json"))["result"]["tools"]
    tools = [{"name": t["name"], "description": t.get("description") or "",
              "input_schema": t["inputSchema"]} for t in mcp_tools]
    
    print("all tools:", count(tools) - count())
    for t in tools:
        print(t["name"], count([t]) - count())
    Each single-tool count includes the fixed overhead (315 tokens in our run), so subtract it to compare tools with each other.

    Which MCP servers should an advertising agent connect?



    The ones that match its job, and no more. A reporting agent needs read access to each ad platform it reports on; the official servers from Google, Meta, Amazon and TikTok cover their own platforms. A creative or brand-safety agent also needs to see the ads and the content around them: what is on screen, what is said, which logos appear. That is a perception job, and it is the part an ad platform's server does not do. Ethan Steininger, Mixpeek's founder, describes the gap this way: agents "cannot watch a video, scan a photo for a logo, or search audio by what was said."

    Doing it in Mixpeek



    Mixpeek reads your files where they already live, in S3, GCS or any bucket, and turns what's in them into data your software can search, classify and moderate. Its hosted MCP server gives an agent that library as tools, in four scoped endpoints:

    EndpointToolsTokens added (2026-10-22)Use it for
    mcp.mixpeek.com/retrieval/mcp1918,151Searching, retrievers, agent sessions
    mcp.mixpeek.com/admin/mcp2324,403Namespaces, taxonomies, clusters
    mcp.mixpeek.com/ingestion/mcp2732,041Buckets, collections, documents
    mcp.mixpeek.com/mcp6768,605Everything, for setup sessions


    Who it fits: agents that need to find a moment in a video library, an image by what is in it, or a passage in a document, over content that already lives in a bucket. Who it does not: an agent that only reads campaign metrics belongs on the ad platform's own server. Build starts at $25 a month (pricing).

    Frequently Asked Questions



    How many tokens does an MCP server use?



    It depends on its tool list. In our 2026-10-22 measurement, Google's official Google Ads MCP server added 3,668 input tokens per request for 3 tools, and Mixpeek's full MCP server added 68,605 for 67 tools. The median Mixpeek tool cost 530 tokens.

    Do MCP tool definitions count against the context window?



    Yes. Tool definitions are input tokens. They take space in the context window and are billed on every request that includes them, unless your client defers loading them.

    Why does one MCP tool cost thousands of tokens?



    Usually because of its input schema. Schemas generated from code carry nested objects, long enum notes and docstrings. One Mixpeek tool, list_storage_connections, costs 5,172 tokens, mostly from a single filter whose description lists every storage provider.

    Does prompt caching fix tool token costs?



    It lowers the price of the repeated tokens on later turns. The definitions are still in the context window, and the model still chooses among all of them.

    How many tools can an agent handle?



    Anthropic's tool search documentation says Claude's ability to pick the right tool degrades once more than 30 to 50 tools are available, and recommends tool search when tool definitions pass 10,000 tokens or you have 10 or more tools.

    Related



  1. MCP tools for multimodal AI agents
  2. MCP tool design for multimodal search
  3. Best MCP servers
  4. Mixpeek MCP server docs
  5. Managed Mixpeek

    Put multimodal search to work

    Connect a bucket and Mixpeek runs the whole multimodal search pipeline for you: extraction, indexing, and search over your own objects. No models to wire up, nothing to host.

    Start with Managed
    MVS · bring your own

    Already have vectors?

    Keep your embeddings on your own cloud and run dense, sparse, and BM25 search directly on object storage. From $25/mo.

    Start with MVS

    Connect only the Mixpeek tools your agent needs

    Mixpeek's hosted MCP server comes in scoped endpoints, so a search-only agent loads 19 tools and skips the setup tools it never calls.

    MCP server docsCompare MCP servers