-
Notifications
You must be signed in to change notification settings - Fork 121
Description
Overview
Currently, the OpenTelemetry traces include the result of the client HTTP call to the MCP server in the http.status_code
field, but there's nothing that indicates whether the tool call itself succeeded, just that the client successfully invoked the MCP server.
Consider an MCP interacting with a backend API, if the API returns a 500
status code or some application-level error, the client->MCP http.status_code
still correctly returns a 200
success code, but users cannot do any tracing of problematic tool calls.
Proposal
Add additional field(s) in the mcp.
section of traces/metrics to propagate an indicator of tool execution errors (result.isError: true
in the spec) and the error messages so users can collect information about problems with tool calls.
Reproduce
An easy way to see this is using the fetch
MCP and asking for an invalid website:
Fetch the contents of https://toolhive.ai and summarize
This results in an error, and clients like VS Code indicate this.

But the OTel trace record emitted by ToolHive doesn't contain any indication that an error occurred.