Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/mcp/shared/jsonrpc_dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,9 @@ async def send_raw_request(
code = str(outcome.code)
span.set_attributes({"error.type": code, "rpc.response.status_code": code})
span.set_status(StatusCode.ERROR, outcome.message)
elif method == "tools/call" and isinstance(outcome, Mapping) and outcome.get("isError") is True:
span.set_attribute("error.type", "tool_error")
span.set_status(StatusCode.ERROR)
except TimeoutError:
if not timeout_armed:
# The clock starts only after the write, so this TimeoutError is the
Expand Down
Loading