CourseModel Context Protocol: The Complete Course · Module 3: Tools · part 26 of 77
Part 26 · Module 3: Tools

Incident: A tool name too long for the API

8 min read·13 Oct 2026
Module 3 · Incident file · About 30 minutes · Needs: the Module 3 lab's repository (examples/m03_server.py, tests/test_m03_tools.py)

What happened

On 25 June 2025 a developer, kousen on GitHub, opened issue #2579 on Claude Code, Anthropic's command-line coding agent, titled "Tool Name Length Exceeds Limit in MCP Server Configuration" (claude-code issue #2579). He had added GitHub's official MCP server through the Docker MCP Toolkit, under the name docker-mcp. Claude Code, he wrote, "creates method names that append the name I chose (here docker-mcp) to the tools". At least one tool, which he believed was add_pull_request_review_comment_to_pending_review, ended up longer than 64 characters. The result was "a 400 error complaining about a name too long, and nothing works properly after that". He had to remove the MCP server for Claude Code to run at all.

24 Jun 2025 API limit raised to 128 25 Jun 15:11 #2579 opened 400 error 25 Jun 18:18 reply: fixed API-side fix 4 Feb 2026 #23149 opened 64 again the first date is inferred from 'as of yesterday'
Issue #2579 was answered within hours because the API limit had just risen to 128 (green); seven months later #23149 met a 64-character limit again on another path (red).

The reply came three hours later, from ashwin-ant: "This should be fixed as of yesterday (tool names can now be 128 characters)", and "it was a limitation in our API, not actually in Claude Code. So any version should work." The reporter checked and confirmed it worked, and the issue was closed as completed the same day. Anthropic's tool documentation now gives the rule for a tool's name as ^[a-zA-Z0-9_-]{1,128}$ (Claude API docs, "Define tools", checked October 2026).

That was not the end of it. On 4 February 2026, issue #23149 reported a 65-character plugin tool name rejected with a 64-character limit, this time in the tool_reference part of a request (claude-code issue #23149); Lesson 2 of this module quotes its error. A bot closed it on 8 February as a duplicate of an earlier report. Limits can differ between parts of one API, and can change in either direction.

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.