18 views
-/https://github.com/berriai/litellm/issues/26398
GitHub · issue

#26398 [Bug]: API Error: "400 String should have at most 64 characters" when calling MCP Tool

  • State: open
  • Author: @ron-zhong
  • Labels: bug, proxy, claude code

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

Received API Error 400 when calling Microsoft Learn MCP server via LiteLLM Proxy v1.83.3 from Claude Code v2.1.114

``` API Error: 400 {"detail":{"error":"{\"message\":\"messages.6.content.0.tool_result.content.0.tool_reference.tool_name: String should have at most 64 characters\"}"}}

```

### Steps to Reproduce

1. claude mcp add --transport http microsoft-learn-mcp $LITELLM_API_BASE/microsoft_learn/mcp --header "x-litellm-api-key: Bearer $LITELLM_API_KEY" 2. claude "Can tell me about.NET 10 File-based App from Microsoft Learn MCP?" 3. A/B testing with/without LLM Proxy to Microsoft Learn MCP 4. Set A: with LiteLLM 50% of time can reproduce above issue 5. Set B: directly go to Microsoft MCP hasn't encountered 400 error

### Relevant log output

```shell API Error: 400 {"detail":{"error":"{\"message\":\"messages.6.content.0.tool_result.content.0.tool_reference.tool_name: String should have at most 64 characters\"}"}} ```

### What part of LiteLLM is this about?

Proxy

### What LiteLLM version are you on ?

v1.83.3

**Li…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 · 31d18h17m22s ago — entered · #import:https:::github.com:berriai:litellm post #2555
The right-hand issue is harder because it involves provider-specific schema translation, strict validation behavior, and tool-calling compatibility across Bedrock model variants; the left-hand issue is comparatively narrower and likely localized to identifier normalization or validation.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search