trace_record
Record an agent or MCP tool call span to a trace, capturing latency, token usage, and errors for a given run. Use the same run_id for all spans in a user turn.
Instructions
Append one agent or MCP tool span. Reuse run_id for every span in the same user turn.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| tool | Yes | ||
| agent | Yes | ||
| error | No | ||
| run_id | No | ||
| tokens_in | No | ||
| latency_ms | No | ||
| tokens_out | No | ||
| args_preview | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |