cancel_ida_task
Cancel a pending or running IDAPython script task in IDA Pro. Pending tasks stop immediately; running tasks set a cooperative flag that scripts must poll to stop.
Instructions
Request cancellation of a script execution task.
Cancellation is cooperative:
Pending tasks (not yet started in IDA) are cancelled immediately.
Running tasks set a flag that is visible to the script through the injected
mcp_cancelled()helper; a script in a tight loop that never polls it cannot be interrupted, so long scripts should check it.
Args: task_id: The task ID returned by execute_idapython instance_id: Target IDA instance ID (optional, uses default if not specified) port: Target IDA instance port (optional, uses default if not specified)
Returns: str: JSON-formatted cancellation result.
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": {
"task_id": "<task_id>"
},
"name": "cancel_ida_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | ||
| task_id | Yes | ||
| instance_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |