[BUG] OpenTelemetry tool_name shows generic "mcp_tool" instead of full MCP tool name since v2.1.2
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Since version 2.1.2, the OpenTelemetry tool_result event logs tool_name as the generic string mcp_tool instead of the full tool name format mcp__<server>__<tool>.
This breaks observability dashboards that track MCP server and tool usage patterns.
What Should Happen?
The tool_name attribute should contain the full MCP tool name, e.g.:
mcp__jira__search_issues
mcp__context7__get-library-docs
mcp__playwright__browser_click
Error Messages/Logs
Query aggregating tool_name by version shows the regression:
| Version | tool_name | count |
|---------|------------------------------------|-------|
| 2.1.1 | mcp__jira__search_issues | 29 |
| 2.1.1 | mcp__figma__get_design_context | 7 |
| 2.1.2 | mcp_tool | 144 |
| 2.1.3 | mcp_tool | 2254 |
| 2.1.29 | mcp_tool | 60 |
Last working version: 2.1.1
First broken version: 2.1.2
Steps to Reproduce
Enable OpenTelemetry logging:
export CLAUDE_CODE_ENABLE_TELEMETRY=1
export OTEL_LOGS_EXPORTER=otlp,console
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
Use any MCP tool (e.g., call a Jira or Context7 tool)
Query the tool_result events and observe tool_name is mcp_tool instead of the full name
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.1
Claude Code Version
2.1.29
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗