203**`claude_code.tool`**203**`claude_code.tool`**
204 204
205| Attribute | Description | Gated by |205| Attribute | Description | Gated by |
206| ----------------- | ------------------------------------------------------------------------------------------------------------------ | ----------------------- |206| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------- |
207| `tool_name` | Tool name | |207| `tool_name` | Tool name | |
208| `duration_ms` | Wall-clock duration including permission wait and execution | |208| `duration_ms` | Wall-clock duration including permission wait and execution | |
209| `result_tokens` | Approximate token size of the tool result | |209| `result_tokens` | Approximate token size of the tool result | |
210| `agent_id` | Identifier of the subagent or teammate that ran the tool. Absent on the main session | |210| `agent_id` | Identifier of the subagent or teammate that ran the tool. Absent on the main session | |
211| `parent_agent_id` | Identifier of the agent that spawned this one. Absent for the main session and for agents spawned directly from it | |211| `parent_agent_id` | Identifier of the agent that spawned this one. Absent for the main session and for agents spawned directly from it | |
212| `tool_use_id` | The model's `tool_use` block id for this call. Matches the `tool_use_id` on the [tool\_result](#tool-result-event) and [tool\_decision](#tool-decision-event) events and in hook payloads, so you can join the span to those records | |
213| `gen_ai.tool.call.id` | Same value as `tool_use_id`. OpenTelemetry GenAI semantic convention | |
212| `file_path` | Target file path for Read, Edit, and Write tools | `OTEL_LOG_TOOL_DETAILS` |214| `file_path` | Target file path for Read, Edit, and Write tools | `OTEL_LOG_TOOL_DETAILS` |
213| `full_command` | Command string for the Bash tool | `OTEL_LOG_TOOL_DETAILS` |215| `full_command` | Command string for the Bash tool | `OTEL_LOG_TOOL_DETAILS` |
214| `skill_name` | Skill name for the Skill tool | `OTEL_LOG_TOOL_DETAILS` |216| `skill_name` | Skill name for the Skill tool | `OTEL_LOG_TOOL_DETAILS` |
227**`claude_code.tool.execution`**229**`claude_code.tool.execution`**
228 230
229| Attribute | Description | Gated by |231| Attribute | Description | Gated by |
230| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |232| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
231| `duration_ms` | Time spent running the tool body | |233| `duration_ms` | Time spent running the tool body | |
234| `tool_use_id` | Same value as on the parent `claude_code.tool` span | |
235| `gen_ai.tool.call.id` | Same value as `tool_use_id`. OpenTelemetry GenAI semantic convention | |
232| `success` | `true` or `false` | |236| `success` | `true` or `false` | |
233| `error` | Error category string when execution failed, such as `Error:ENOENT` or `ShellError`. Contains the full error message instead when the gate is set | `OTEL_LOG_TOOL_DETAILS` |237| `error` | Error category string when execution failed, such as `Error:ENOENT` or `ShellError`. Contains the full error message instead when the gate is set | `OTEL_LOG_TOOL_DETAILS` |
234 238
820* `skill.name`: Name of the skill. For user-defined and third-party plugin skills the value is the placeholder `"custom_skill"` unless `OTEL_LOG_TOOL_DETAILS=1`824* `skill.name`: Name of the skill. For user-defined and third-party plugin skills the value is the placeholder `"custom_skill"` unless `OTEL_LOG_TOOL_DETAILS=1`
821* `invocation_trigger`: How the skill was triggered (`"user-slash"`, `"claude-proactive"`, or `"nested-skill"`)825* `invocation_trigger`: How the skill was triggered (`"user-slash"`, `"claude-proactive"`, or `"nested-skill"`)
822* `skill.source`: Where the skill was loaded from (for example, `"bundled"`, `"userSettings"`, `"projectSettings"`, `"plugin"`)826* `skill.source`: Where the skill was loaded from (for example, `"bundled"`, `"userSettings"`, `"projectSettings"`, `"plugin"`)
827* `skill.kind`: `"workflow"` when the skill is a workflow skill. Absent otherwise
823* `plugin.name` (when `OTEL_LOG_TOOL_DETAILS=1` or the plugin is from an official marketplace): Name of the owning plugin when the skill is provided by a plugin828* `plugin.name` (when `OTEL_LOG_TOOL_DETAILS=1` or the plugin is from an official marketplace): Name of the owning plugin when the skill is provided by a plugin
824* `marketplace.name` (when `OTEL_LOG_TOOL_DETAILS=1` or the plugin is from an official marketplace): Marketplace the owning plugin was installed from, when the skill is provided by a plugin829* `marketplace.name` (when `OTEL_LOG_TOOL_DETAILS=1` or the plugin is from an official marketplace): Marketplace the owning plugin was installed from, when the skill is provided by a plugin
825 830