Skip to content

MCP server tool names exceed 64-character API limit #11

@quad1661

Description

@quad1661

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions