Skip to main content
Glama
SuZiXunYue

IDA Script MCP

by SuZiXunYue

cancel_ida_task

DestructiveIdempotent

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNo
task_idYes
instance_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.3.0

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations (destructiveHint=true, idempotentHint=true) by disclosing that cancellation is cooperative, that pending tasks cancel immediately while running tasks only set a flag, and that tight-loop scripts polling may never observe it. This directly reframes what the destructive hint means in practice and warns the caller of a real failure mode.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first line, and the bulleted cooperative-cancellation semantics are tight and each convey a distinct, load-bearing fact. No padding or repetition of the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return values need not be explained, yet the description still notes a JSON result string. The non-obvious cooperative semantics and the mcp_cancelled() polling contract are exactly the context an agent needs to call this correctly and warn users about uninterruptible scripts.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry parameter meaning, and it does: task_id is identified as the value returned by execute_idapython, and instance_id/port are described as optional overrides of a default target. It stops short of giving formats or clarifying precedence when both instance_id and port are supplied.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Request cancellation of a script execution task') and immediately names the sibling that produces the task_id (execute_idapython), so the agent can place it in the workflow without opening the schema. It is clearly distinct from check_task_status and execute_idapython.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: the description ties task_id back to execute_idapython, which signals when you would call this. However, it never explicitly contrasts with check_task_status or states whether cancellation can be requested for already-completed tasks, so the when/when-not guidance is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.