run_scenario
Execute millisecond-timed multi-step CAN scripts in one call to automate sequenced open, send, wait, and close flows, returning JSON per-step timing and cleaning up scenario-owned periodic tasks.
Instructions
Run a millisecond-timed multi-step CAN script in one call.
Prefer this for sequenced open→send→wait→close flows; use the single-shot
tools (send_frame, monitor, …) for one operation. periodic_start steps must
include duration_s (max 300). On finish, scenario-owned periodic tasks are
cleaned up. Returns JSON Result with per-step timing; invalid JSON yields
INVALID_ARGUMENT.
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": {
"steps_json": "<steps_json>"
},
"name": "run_scenario"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps_json | Yes | JSON string: a steps array, or an object with steps plus optional vars. Actions include open/send/wait_id/wait_n/drain/filter/accept_all/sleep/repeat/try/burst_send/periodic_start/periodic_stop/close. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |