Free tools & guides /

Free tool · No signup

MCP Tool Schema Token Calculator

See how much space your tool definitions take before a conversation begins. Inspect each schema, find the largest definitions, and plan the rest of your context.

Inspect your tool definitions

Start with this example or paste an MCP tools array. JSON stays in this tab: it is not uploaded, saved, or added to a share URL.

Up to 100 tools and 64 KiB. Accepts an array, a tools object, or a JSON-RPC tools/list response. Definitions are inspected; tools are not executed.

cl100k_base · Normalized JSON

92

tokens in 2 serialized tool definitions

0.072% of this window, before messages, tool results, and provider formatting.

Largest definitions first

ToolTokens
find_reference49
read_reference41

Each row is counted separately. The total counts the complete JSON array, so boundaries and array punctuation can make it differ from the sum of rows.

This is a tokenizer count of normalized MCP JSON, not your provider’s final billed usage. Hosts can transform schemas, select fewer tools, and add formatting. Confirm the actual request with your provider’s counting endpoint or usage.

Connect your models and add security reference context with CyberRouter.

Explore CyberRouter

From schema size to a full request budget

Start with the definitions your host sends. Add retained results and conversation separately, then reserve room for output. Keep important parameter descriptions and constraints when shortening definitions; fewer tokens alone do not prove better tool selection.

MCP token counting questions

What does this MCP token calculator measure?

It extracts the tools array, removes JSON whitespace, and counts the serialized definitions with the cl100k_base tokenizer. Every property inside each tool is retained, including descriptions, schemas, annotations, and other metadata. JSON-RPC response wrappers and pagination fields outside the tools array are excluded.

Is this an exact token count for Claude or every model?

No. It is a count for one named encoding applied to normalized MCP JSON. Your host may translate that JSON into a different provider format, and tokenizers differ. Use the count to inspect relative schema size; confirm final usage with the provider that serves your request.

Do unused MCP tools consume context?

A definition consumes space when your host includes it in the model request. A tool being installed or returned by tools/list does not establish that it is sent on every request. Check which definitions your host actually loads.

Are tool results included?

No. This calculator measures definitions. Tool results, conversation history, instructions, retrieved material, and output reserves need separate allocations in the full context budget.

Is my JSON sent to CyberRouter?

No. Parsing and tokenization run in your browser. The tool does not upload, store, or include your JSON in URLs. Optional website analytics follow your existing preferences and do not receive tool names, schemas, counts, or entered text.

Why does pretty-printed JSON get the same result?

Whitespace outside strings is removed before counting so formatting does not distort the comparison. Whitespace inside descriptions and other string values is preserved. This tool checks basic input shape; it is not a full JSON Schema validator.

Method: gpt-tokenizer, cl100k_base encoding. Tool fields: MCP tools specification. Provider-side verification: Claude token-counting documentation. Tokenizer license.

Accessibility

Adjust how CyberRouter looks and moves. Preferences apply to this browser.

You can also use your browser’s zoom controls.

Accessibility help

Analytics preferences

Choose anonymous page counts or optional visit, scroll and reading-time analytics. Privacy details.