get_trace
Returns the full step-by-step trace of a run of an exposed macro, with the failure explained in words.
Details #
Use it after run_macro to see inputs and outputs of every step, or to follow a run that was still going when run_macro returned.
{ "jsonrpc": "2.0", "id": 3, "method": "tools/call",
"params": { "name": "get_trace", "arguments": { "runId": "r_91c0d3" } } }
The result is the run as in GET /runs/{id}, with two additions and one removal:
macro: the macro's name.failureInWords: a sentence for a failed, cancelled or timed-out run.returned: the value the macro returned, as inrun_macro.variablesAfteris removed, so shared state and the clipboard stay out of an agent's reach.
When a step failed because an element wasn't found, failure.candidates lists up to five elements it came closest to, best first, each with role, identifier, title, description and score (0 to 1). Point a repaired locator only at one of these.
{
"id": "r_91c0d3",
"macro": "Paste ticket as title",
"status": "failed",
"steps": [{ "stepId": "s2", "status": "failed", "ms": 120, "note": "element not found" }],
"failureInWords": "Step s2 (click) failed. Pick the element again."
}
Gotchas #
Only runs of exposed macros, or macros the agent created, can be read. Any other id answers
No trace for run <id>.