Skip to content
IsoKron

Tool names of 64 characters or fewer

The Anthropic connector checklist requires tool names of 64 characters or fewer, and Claude validates every name against ^[a-zA-Z0-9_-]{1,64}$, so a longer name, or one with a dot or space, fails.

Check anthropic-name-length · Anthropic connector directory · default severity: blocking · rubric 2.1.0

Error message you’ll see

Error
tools.275.FrontendRemoteMcpToolDefinition.name: String should match pattern '^[a-zA-Z0-9_-]{1,64}$'

Claude Desktop, when a connected server lists the name. Where this was reported

Error
Invalid 'tools[3].function.name': string too long. Expected a string with maximum length 64, but got a string with length 67 instead.

OpenAI API, when a client forwards MCP tools as functions. Where this was reported

What fails

The Anthropic directory limit is half the specification's 128.

The rule

Tool names must be 64 characters or fewer.

Source: Anthropic connector pre-submission checklist

How to fix it

Shorten the name to 64 characters or fewer.

  1. Read the index in the error (tools.48 is the 49th tool sent, counted across all connected servers).
  2. Rename the tool to 64 characters or fewer using only letters, digits, underscore and hyphen.
  3. Re-list the tools and check the combined name a client builds (server prefix plus tool name).

TypeScript SDK

TypeScript
import { McpServer } from '@modelcontextprotocol/server';
import * as z from 'zod';

const server = new McpServer({ name: 'issues', version: '1.0.0' });

server.registerTool(
  'search_issues',
  {
    title: 'Search issues',
    description: 'Search issues by text and state. Use when the user describes an issue but has no ID.',
    inputSchema: z.strictObject({
      query: z.string().describe('Words to search for'),
      state: z.enum(['open', 'closed', 'all']).default('open').describe('Which issues to include'),
    }),
    annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
  },
  async ({ query, state }) => ({ content: [{ type: 'text', text: 'Done' }] }),
);

Python SDK

Python
from typing import Annotated, Literal

from pydantic import Field
from mcp.server.mcpserver import MCPServer
from mcp.types import ToolAnnotations

server = MCPServer("issues")

@server.tool(
    title="Search issues",
    annotations=ToolAnnotations(readOnlyHint=True, destructiveHint=False, openWorldHint=False),
)
def search_issues(
    query: Annotated[str, Field(description="Words to search for")],
    state: Annotated[Literal["open", "closed", "all"], Field(description="Which issues to include")] = "open",
) -> str:
    """Search issues by text and state. Use when the user describes an issue but has no ID."""
    return "Done"

Run against @modelcontextprotocol/server 2.4.0, mcp 2.3.0 and fastmcp 4.2.2 on 2026-11-18; the checker confirms this check passes on the tool list each snippet produces.

Questions

Why does one bad name break every tool of my connector?

Claude sends all tool definitions to the model in one request. When one name fails the pattern, the request is refused, so no tool from that request can be used until the name is fixed.

Are dots allowed in tool names?

The MCP specification allows dots, but the Claude pattern ^[a-zA-Z0-9_-]{1,64}$ does not. Use underscores (issues_search) instead of dots (issues.search) if the server should work in Claude.

How this check is graded

It counts toward: Anthropic connector directory. See the rubric.

Last verified against Anthropic connector pre-submission checklist on 2026-11-18. The rule above is quoted in the source’s own words. This page as Markdown.

Check your tool list: paste your tools/list, nothing is sent anywhere