Cancel Task
cancel_taskAbort a running task by sending SIGTERM to its child processes, executing cleanup callbacks, and marking it as cancelled. Idempotent operation.
Instructions
Aborts a running task: sends SIGTERM to children, runs registered cleanups in reverse order, marks the task cancelled. Idempotent and never throws.
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": {
"taskId": "<taskId>"
},
"name": "cancel_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | ||
| taskId | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| taskId | Yes | ||
| notFound | No | ||
| cancelled | Yes | ||
| finalStatus | No | ||
| cancelReason | No | ||
| previousStatus | No |