trustmodel_trace_finalize
Close an active trace session, upload captured steps to cloud, and auto-create an agentic evaluation run. Returns file path and evaluation run ID.
Instructions
Close an active trace session, serialize the captured steps, upload to TrustModel cloud storage, and auto-create an agentic evaluation run. Returns both a file_path (for record-keeping / retry) and an evaluation_run_id that can be polled with trustmodel_score_agent.
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": "trustmodel_trace_finalize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | No | Override `goal` if the agent learned more at runtime. | |
| name | No | Override `name` provided at trace_start. | |
| success | No | Whether the run is considered successful overall. | |
| trace_id | Yes | Trace handle returned by trustmodel_trace_start. | |
| agent_model | No | Override `agent_model` provided at trace_start. | |
| goal_achieved | No | Whether the agent achieved its goal. | |
| actual_outcome | No | Optional description of what actually happened. | |
| final_response | No | The final user-facing answer from the agent. | |
| agent_framework | No | Override `agent_framework` provided at trace_start. | |
| expected_outcome | No | Override `expected_outcome` provided at trace_start. | |
| total_duration_ms | No | Total execution time in ms. If omitted, computed from step durations. |