gateway.tasks_cancel
Cancel a downstream MCP task by its opaque task ID, limited to tasks PMCP has recorded; already-finished tasks are reported without a downstream call.
Instructions
Cancel a downstream MCP task by opaque task ID. Only a task PMCP has recorded (from gateway.invoke with task, gateway.tasks_list, gateway.tasks_get or gateway.tasks_result) can be cancelled; an already-finished task is reported without a downstream call. Use gateway.cancel only for PMCP request IDs from gateway.list_pending.
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": {
"server_name": "<server_name>",
"task_id": "<task_id>"
},
"name": "gateway.tasks_cancel"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Passed as force in the downstream tasks/cancel request; PMCP applies no health check of its own | |
| task_id | Yes | Opaque downstream task ID | |
| server_name | Yes | Server that owns the task | |
| requestor_context | No | Opaque requestor context forwarded downstream |