Get Trace Turns
get_trace_turnsList the turns of one agent trace: where one prompt's work ends and the next starts.
A turn is one user (or system) prompt and everything the agent did to answer
it. Each row gives the turn's span id, start and end (open while the agent is
still working on it), who prompted it, its LLM and tool calls, its three most
used tools, its errors, tokens and cost. A ≥ before the tokens means some LLM
calls reported none, so the total is a floor. Find the turn's span id in
get_agent_trace's waterfall to read that part of the trace. A trace without
turn spans is reported as one turn covering every span.
trace_id: the trace id (from list_agent_traces).
workspace: optional workspace id, name, or org-name/workspace-name when
the same name occurs in two of your orgs (defaults to your default;
use list_workspaces to discover them).
Example:
Which turn of trace 4bf92f3577b34da6a3ce929d0e0e4736 failed?
{
"name": "get_trace_turns",
"arguments": { "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736" }
}Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"trace_id": "<trace_id>"
},
"name": "get_trace_turns"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trace_id | Yes | ||
| workspace | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |