Cancel run
cancel_runStop a run that is still in flight. Permanent — a cancelled run cannot be resumed.
Credits already spent are not refunded and finished lines are not delivered. Without confirm=true nothing is cancelled: you get the run's current state to show the user. Already-finished runs are returned unchanged.
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": {
"workflow_id": "<workflow_id>",
"run_id": "<run_id>"
},
"name": "cancel_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run_id | Yes | The run_id from run_workflow or list_runs. | |
| confirm | No | false cancels nothing and reports what would stop. true stops the run permanently. | |
| workflow_id | Yes | The workflow_id from list_workflows. Never invent one. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run_id | No | ||
| status | No | ||
| cancelled | No | ||
| next_step | No | ||
| total_steps | No | ||
| finished_steps | No | ||
| workspace_slug | No | ||
| requires_confirmation | No |