Skip to content

Slack MCP: Tool responses may exceed API tool_name 64-char limit #3258

@TechnicalRhino

Description

@TechnicalRhino

Description

When using @modelcontextprotocol/server-slack with Claude Code, an API error occurs because a tool_reference.tool_name in the response exceeds the 64-character limit enforced by the Anthropic API.

Error Message

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.10.content.0.tool_result.content.2.tool_reference.tool_name: String should have at most 64 characters"},"request_id":"req_011CXa13UuZz4NJ9bb7mURZb"}

Steps to Reproduce

  1. Configure Slack MCP server with Claude Code
  2. Attempt to use any Slack tool (e.g., post a message)
  3. API error occurs

Expected Behavior

Tool should execute successfully.

Actual Behavior

API returns 400 error due to tool name length validation failure.

Analysis

The error path tool_result.content.2.tool_reference.tool_name indicates the issue is in the tool result content, suggesting the Slack MCP server might be:

  1. Returning responses that include references to other tools
  2. Including tool names in its response content that, when prefixed by the client (e.g., mcp__slack__), exceed 64 characters

When MCP clients prefix tool names (e.g., mcp__{server}__{tool}), the combined name can easily exceed the API's 64-character limit.

Environment

  • Package: @modelcontextprotocol/server-slack (latest via npx)
  • Client: Claude Code CLI
  • OS: macOS

Suggested Fix

Consider:

  1. Ensuring tool names exposed by the server are short enough to accommodate client prefixes
  2. Not including tool references in response content, or using shortened identifiers
  3. Documenting maximum recommended tool name lengths for MCP servers

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions