[Bug] MCPSearch tool_reference tool_name exceeds 64-character API limit

Resolved 💬 2 comments Opened Jan 13, 2026 by glindsey-amper Closed Feb 27, 2026

Bug Description
The MCPSearch tool is generating tool_reference objects with tool_name values exceeding the 64-character API limit.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.6
  • Feedback ID: a666cb3b-fbf0-4ce0-b036-eeef93ee1d08

Errors

[{"error":"Error: LSP server plugin:typescript-lsp:typescript failed to start: Executable not found in $PATH: \"typescript-language-server\"\n    at start (/$bunfs/root/claude:2266:22300)\n    at async $ (/$bunfs/root/claude:2266:24752)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-13T21:52:02.955Z"},{"error":"Error: LSP server plugin:pyright-lsp:pyright failed to start: Executable not found in $PATH: \"pyright-langserver\"\n    at start (/$bunfs/root/claude:2266:22300)\n    at async $ (/$bunfs/root/claude:2266:24752)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-13T21:52:02.955Z"},{"error":"Error: Executable not found in $PATH: \"typescript-language-server\"\n    at spawn (unknown)\n    at spawn (node:child_process:667:35)\n    at spawn (node:child_process:14:39)\n    at start (/$bunfs/root/claude:2266:20845)\n    at start (/$bunfs/root/claude:2266:22354)\n    at $ (/$bunfs/root/claude:2266:24752)\n    at $ (/$bunfs/root/claude:2266:25727)\n    at _ (/$bunfs/root/claude:2266:32514)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-13T21:52:02.955Z"},{"error":"Error: Executable not found in $PATH: \"pyright-langserver\"\n    at spawn (unknown)\n    at spawn (node:child_process:667:35)\n    at spawn (node:child_process:14:39)\n    at start (/$bunfs/root/claude:2266:20845)\n    at start (/$bunfs/root/claude:2266:22354)\n    at $ (/$bunfs/root/claude:2266:24752)\n    at $ (/$bunfs/root/claude:2266:25727)\n    at _ (/$bunfs/root/claude:2266:32514)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-13T21:52:02.955Z"},{"error":"Error: Failed to start LSP server plugin:typescript-lsp:typescript: Executable not found in $PATH: \"typescript-language-server\"\n    at <anonymous> (/$bunfs/root/claude:2266:32536)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-13T21:52:02.955Z"},{"error":"Error: Failed to start LSP server plugin:pyright-lsp:pyright: Executable not found in $PATH: \"pyright-langserver\"\n    at <anonymous> (/$bunfs/root/claude:2266:32536)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-01-13T21:52:02.955Z"}]

Notes
I don't believe the errors above are relevant. Below, however, I have attached Claude's own analysis of, well, itself:

Problem Identified:

The MCPSearch tool is generating tool_reference objects with tool_name values exceeding the 64-character API limit.

Root Cause:

Several MCP tool names in the available tool list exceed this limit:

  • mcp__awslabs_cloudwatch-mcp-server__get_recommended_metric_alarms (66 characters)
  • Similar long names in the workspace-mcp and cloudwatch-mcp-server collections

Error Location:

The error occurs in messages.6.content.0.tool_result.content.1.tool_reference.tool_name, indicating the MCPSearch tool is returning
references to these tools in its results, which then fail API validation when the tool result is submitted.

Assessment:

This is a system-level constraint violation. The MCPSearch tool implementation needs to either:

  1. Truncate or abbreviate tool names in tool_reference objects to fit within 64 characters
  2. Use alternative reference mechanisms for tools with long names
  3. Filter out tools with names exceeding the limit from search results

Recommendation:

This issue should be reported to the Claude Code development team. The MCPSearch tool's output formatting is incompatible with the
API's tool_reference constraints.

Unable to resolve this issue from the conversation level. This requires modification to the MCPSearch tool implementation itself.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗