MCP tool definitions over 20,000 tokens crowd the model's context
The combined size of all tool definitions warns above about 20,000 tokens and fails above 50,000. Shorten descriptions and schemas.
Shorten descriptions and schemas so the whole tool list stays under about 20,000 tokens. The rule count.definition-tokens is a minor finding for Claude and general clients: warn above 20,000, fail above 50,000. No directory states a limit; the thresholds are the rule's own.
What you see
- A scan reports
count.definition-tokens:About 24000 tokens of tool definitions. - The estimate is the JSON length of each tool's name, description, inputSchema and annotations, divided by 4. It is an approximation, not a model tokenizer count.
Why it happens
Every tool definition is loaded into the model's context on each turn. The rule's fix text points to Claude policy 5.B, which asks for token use proportionate to the task. Long descriptions (desc.too-long), parameter lists (schema.too-many-params) and large tool counts (count.too-many) all add up.
Check it yourself
curl -s -X POST https://mcp.acme.example/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-H "Authorization: Bearer $TOKEN" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' \
| jq -c '.result.tools | map({name, description, inputSchema, annotations}) | tostring | length / 4 | floor'
The result is the same rough estimate.
Fix
- Cut descriptions to what is needed to choose and call the tool.
- Remove repeated text from parameter descriptions.
- Merge or drop tools nobody uses.
- Move long guidance to server instructions or docs.
Verify
The estimate falls under 20,000, then re-scan.
Which clients care
Claude and general, per the rule.
Source
Anthropic Software Directory Policy: https://support.claude.com/en/articles/13145358-anthropic-software-directory-policy
Run a free scan at https://mcpshipyard.com/scan to check every rule at once.
Check every rule at once
A free scan runs this check and the other 152 against your live URL.