Claude MCP tool name too long: 64 character limit and how to rename
Claude's directory rejects MCP tool names over 64 characters, though the spec allows 128. Find long names with jq and shorten them.
Keep every MCP tool name at 64 characters or fewer. Claude's directory policy (5.C) and review criteria reject longer names, even though the MCP specification suggests names of 1 to 128 characters.
What you see
- A scan reports
naming.length: "Name is N characters (limit 64)". It is a blocker for Claude. - A directory review failing on tool names. Exact portal wording is not verified here.
- The separate rule
naming.spec-lengthonly warns above 128.
Why it happens
Generated tool names are the usual cause: an OpenAPI-to-MCP converter that joins method, path and parameters, or a namespace prefix added to every tool (acme_production_crm_contacts_search_by_email_address). The spec limit is looser than Claude's, so the server works in other clients.
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 -r '.result.tools[] | select(.name|length > 64) | "\(.name|length) \(.name)"'
Fix
Rename the tool and update every place that references it (handlers, tests, docs, prompts). Keep verbs first and drop redundant words:
| Before | After |
|---|---|
acme_production_crm_contacts_search_by_email_address_and_company | search_contacts |
get_all_of_the_customer_invoices_for_a_given_billing_period | list_invoices |
Put the details in the description and parameters, not the name. If a converter generates names, set an explicit name override or a maximum length in its config.
Mind the charset too: names should use only letters, digits, underscore, hyphen and dot (see naming.charset), and must be unique (naming.duplicate) after shortening.
Verify
Re-run the jq filter and expect no output. Call each renamed tool once to confirm clients and saved prompts still resolve it.
Which clients care
Claude only for this rule, per the rule's platform tag. Other clients accept up to the spec limit as far as this rule is concerned; they are not tested here.
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.