trustmodel_trace_step
Records each reasoning step, tool call, tool result, or response in an active trace session. Use after initiating a trace to log step type and content.
Instructions
Record a single step in an active trace session. Call once per reasoning step, tool call, tool result, or user-facing response. Step numbers are auto-assigned (1-based). Requires a trace_id from trustmodel_trace_start.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Human-readable text for this step. Empty string allowed. | |
| trace_id | Yes | Trace handle returned by trustmodel_trace_start. | |
| step_type | Yes | Kind of step: 'thought'/'think' (reasoning), 'tool_call', 'tool_result', 'observation', 'decision', 'error', 'human_input', 'response'/'final_answer' (user-facing output). | |
| timestamp | No | ISO 8601 timestamp. Defaults to the current time if omitted. | |
| tool_args | No | Arguments passed to the tool (use with step_type='tool_call'). | |
| tool_name | No | Name of the tool invoked (use with step_type='tool_call' or 'tool_result'). | |
| model_used | No | Model used for this step's reasoning. | |
| duration_ms | No | How long this step took, in milliseconds. | |
| tool_result | No | Result returned by the tool (use with step_type='tool_result'). | |
| input_tokens | No | Input token count for this step. | |
| output_tokens | No | Output token count for this step. | |
| tool_call_success | No | Whether the tool call succeeded (use with step_type='tool_result'). |