[GH-ISSUE #11] MCP server tool names exceed 64-character API limit #4

Open
opened 2026-03-02 03:21:10 +03:00 by kerem · 2 comments
Owner

Originally created by @quad1661 on GitHub (Jan 29, 2026).
Original GitHub issue: https://github.com/cloudflare/skills/issues/11

Summary

The MCP server names defined in .mcp.json cause tool names to exceed the 64-character limit enforced by the Claude API, resulting in invalid_request_error when using the plugin.

Error

{"type":"error","error":{"type":"invalid_request_error","message":"messages.X.content.0.tool_result.content.0.tool_reference.tool_name: String should have at most 64 characters"}}

Root Cause

Claude Code prefixes MCP tool names with mcp__plugin_cloudflare_, then appends the server name and tool name. The current server names in .mcp.json create excessively long prefixes:

Server Name Full Prefix Length
cloudflare-docs mcp__plugin_cloudflare_cloudflare-docs__ 41
cloudflare-workers-observability mcp__plugin_cloudflare_cloudflare-workers-observability__ 56
cloudflare-workers-builds mcp__plugin_cloudflare_cloudflare-workers-builds__ 49

When combined with tool names like query_worker_observability (26 chars), the total exceeds 64 characters.

Suggested Fix

Remove the redundant cloudflare- prefix from server names since it's already included in the plugin prefix:

{
  "mcpServers": {
    "docs": {
      "command": "npx",
      "args": ["mcp-remote", "https://docs.mcp.cloudflare.com/mcp"]
    },
    "observability": {
      "command": "npx",
      "args": ["mcp-remote", "https://observability.mcp.cloudflare.com/mcp"]
    },
    "builds": {
      "command": "npx",
      "args": ["mcp-remote", "https://builds.mcp.cloudflare.com/mcp"]
    }
  }
}

This would create prefixes of 29-38 characters, leaving ample room for tool names.

Environment

  • Claude Code CLI
  • Cloudflare skills plugin (commit 3f72589, 2026-01-28)
Originally created by @quad1661 on GitHub (Jan 29, 2026). Original GitHub issue: https://github.com/cloudflare/skills/issues/11 ## Summary The MCP server names defined in `.mcp.json` cause tool names to exceed the 64-character limit enforced by the Claude API, resulting in `invalid_request_error` when using the plugin. ## Error ``` {"type":"error","error":{"type":"invalid_request_error","message":"messages.X.content.0.tool_result.content.0.tool_reference.tool_name: String should have at most 64 characters"}} ``` ## Root Cause Claude Code prefixes MCP tool names with `mcp__plugin_cloudflare_`, then appends the server name and tool name. The current server names in `.mcp.json` create excessively long prefixes: | Server Name | Full Prefix | Length | |-------------|-------------|--------| | `cloudflare-docs` | `mcp__plugin_cloudflare_cloudflare-docs__` | 41 | | `cloudflare-workers-observability` | `mcp__plugin_cloudflare_cloudflare-workers-observability__` | 56 | | `cloudflare-workers-builds` | `mcp__plugin_cloudflare_cloudflare-workers-builds__` | 49 | When combined with tool names like `query_worker_observability` (26 chars), the total exceeds 64 characters. ## Suggested Fix Remove the redundant `cloudflare-` prefix from server names since it's already included in the plugin prefix: ```json { "mcpServers": { "docs": { "command": "npx", "args": ["mcp-remote", "https://docs.mcp.cloudflare.com/mcp"] }, "observability": { "command": "npx", "args": ["mcp-remote", "https://observability.mcp.cloudflare.com/mcp"] }, "builds": { "command": "npx", "args": ["mcp-remote", "https://builds.mcp.cloudflare.com/mcp"] } } } ``` This would create prefixes of 29-38 characters, leaving ample room for tool names. ## Environment - Claude Code CLI - Cloudflare skills plugin (commit 3f72589, 2026-01-28)
Author
Owner

@kalepail commented on GitHub (Jan 29, 2026):

Hitting this as well. Might want to consider actually shortening the mcp tool names themselves as well.

<!-- gh-comment-id:3820344935 --> @kalepail commented on GitHub (Jan 29, 2026): Hitting this as well. Might want to consider actually shortening the mcp tool names themselves as well.
Author
Owner

@davisshaver commented on GitHub (Jan 30, 2026):

Would this be why the servers show up as failed for me in Claude Code?

Image
<!-- gh-comment-id:3823501937 --> @davisshaver commented on GitHub (Jan 30, 2026): Would this be why the servers show up as failed for me in Claude Code? <img width="1039" height="296" alt="Image" src="https://github.com/user-attachments/assets/90361fc9-21af-413c-b8df-0f8d47f803e2" />
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/skills#4
No description provided.