Get script trace
get_script_traceInspect past Home Assistant script runs to diagnose failures: list recent runs, review the latest or a specific run, and see last step, node errors, failed conditions, and a plain-English diagnosis.
Instructions
Inspect past runs of a script to diagnose failures. Without run_id it lists recent runs and details the most recent one. Reports the last step reached, node level errors, failed conditions and a plain English diagnosis.
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": {
"script_id": "<script_id>"
},
"name": "get_script_trace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run_id | No | A specific run id from the run list. Defaults to the most recent run. | |
| script_id | Yes | The script config id or entity id. | |
| runs_limit | No | How many recent runs to list. | |
| only_failed | No | Pick the most recent run that did not finish cleanly. |