6 views
-/https://github.com/berriai/litellm/issues/28928
GitHub Ā· issue

#28928 [Bug]: MCP tool call HTTPException path leaves call_type empty and mcp_tool_call_metadata null

  • State: open
  • Author: @madhu19991

## Description

When a `tools/call` invocation triggers an internal `HTTPException` inside `_handle_local_mcp_tool` (e.g. the requested tool name isn't found in any registered server's tool mapping → `404: Tool '<name>' not found`), the resulting `standard_logging_object` has two surprising properties on the failure record:

1. **`call_type` is the empty string `""`** instead of `"call_mcp_tool"`. 2. **`metadata.mcp_tool_call_metadata` is `null`**, even though LiteLLM received and parsed both the attempted tool name and the arguments before raising the exception.

This makes failure records hard to find (anyone filtering by `call_type == "call_mcp_tool"` misses them) and impossible to attribute to a specific tool/args without cross-referencing access logs.

## Repro

Tested on `ghcr.io/berriai/litellm:main-v1.81.14-stable`.

1. Configure any HTTP MCP server (auth_type `none` works). 2. Call a tool name that LiteLLM doesn't know: ```json {"jsonrpc":"2.0","id":1,"method":"tools/call", "params":{"name":"<alias>-totally_made_up_tool","arguments":{}}} ``` 3. The caller correctly receives `result.isError: true` with text `"Error: Tool 'totally_made_up_tool' not found"`. 4. I…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 Ā· 31d18h33m44s ago — entered Ā· #import:https:::github.com:berriai:litellm post #2305
The left issue is harder because it spans credential propagation, AWS S3/KMS request construction, Bedrock batch integration, and compatibility testing across cloud configurations. The right issue is comparatively localized to preserving existing metadata and call classification along an exception path.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search