Claude Code emits tool_decision and tool_result events linked by tool_use_id. Command text, file paths and MCP names appear only when OTEL_LOG_TOOL_DETAILS is set. Repository settings cannot set the exporter variables, so set them in managed settings. Build rejected-call and new-MCP-tool detections from these events.
Read in this order
- OfficialMonitoring (Claude Code docs)Event attributes, content gates, and managed settings for the OTLP destination.