Cancel run
cancel_runRequest cancellation of a run that has not ended by run_id; it returns cancelling and later cancelled, while finished runs are refused.
Instructions
Request cancellation of a run that has not ended. Returns status "cancelling" at once; the run then ends with status "cancelled", which get_run_result reports. A run that has already ended is refused with 409 run already finished.
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": {
"run_id": "<run_id>"
},
"name": "cancel_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run_id | Yes | The run to cancel. | |
| agent_id | No | The agent that runs the run (agent_id in the run result). Give this or workspace_id. | |
| workspace_id | No | The Workspace the run belongs to. Give this or agent_id; with both, agent_id is used. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| runId | Yes | The run whose cancellation was requested. | |
| status | Yes | Cancellation request status. |