Skip to main content
Glama
jayluxferro

Burp Suite MCP Server

by jayluxferro

cancel_scan

Stop an active Burp Suite vulnerability scan by providing its task ID. Terminate running security scans to manage resources or halt testing operations.

Instructions

Cancel a scan by task_id. May not be supported by all Burp API versions.

Args:
    task_id: Task ID of the scan to cancel

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • main.py:263-277 (handler)
    Main handler for cancel_scan tool. Accepts a task_id, normalizes it, and makes a DELETE request to /scan/{task_id} to cancel the scan. Returns success or failure message.
    @mcp.tool("cancel_scan")
    async def cancel_scan(task_id: str | int) -> str:
        """
        Cancel a scan by task_id. May not be supported by all Burp API versions.
    
        Args:
            task_id: Task ID of the scan to cancel
        """
        tid = _normalize_task_id(task_id)
        resp = await make_api_request("DELETE", f"/scan/{tid}")
        if resp is not None and resp.status_code in (200, 204):
            return f"Scan {tid} has been cancelled."
        return (
            f"Could not cancel scan {tid}. The Burp REST API may not support DELETE /scan/{{id}}."
        )
  • main.py:263-263 (registration)
    Tool registration via the @mcp.tool("cancel_scan") decorator from FastMCP framework.
    @mcp.tool("cancel_scan")
  • Helper function to normalize task_id. Converts int to string and handles full path formats by extracting just the ID.
    def _normalize_task_id(task_id: str | int) -> str:
        """Normalize task_id to numeric string (handles full path or ID)."""
        tid = str(task_id)
        if "/" in tid:
            parsed = _parse_task_id(tid)
            return parsed or tid
        return tid
  • main.py:43-83 (helper)
    Core helper function for making HTTP requests to the Burp REST API. Used by cancel_scan to send the DELETE request.
    async def make_api_request(
        method: str, request_path: str, payload: dict[str, Any] | None = None
    ) -> httpx.Response | None:
        """
        Make a request to the Burp REST API.
        Returns None on failure; logs the error for debugging.
        """
        err = _validate_config()
        if err:
            logger.warning(err)
            return None
    
        path = request_path.lstrip("/")
        if BURP_REST_API_KEY:
            url = f"{BURP_REST_API_BASE}/{BURP_REST_API_KEY}/{BURP_REST_API_VERSION}/{path}"
        else:
            url = f"{BURP_REST_API_BASE}/{BURP_REST_API_VERSION}/{path}"
        async with httpx.AsyncClient() as client:
            try:
                response = await client.request(
                    method,
                    url,
                    json=payload,
                    headers=DEFAULT_HEADERS,
                    timeout=30,
                )
                response.raise_for_status()
                return response
            except httpx.HTTPStatusError as e:
                logger.warning(
                    "Burp API HTTP error: %s %s",
                    e.response.status_code,
                    e.response.text[:200],
                )
                return None
            except httpx.RequestError as e:
                logger.warning("Burp API request failed: %s", e)
                return None
            except Exception as e:
                logger.warning("Burp API unexpected error: %s", e)
                return None
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds the version compatibility warning but fails to disclose critical mutation behaviors: whether cancellation preserves partial results, if the operation is reversible, error handling for invalid task IDs, or whether this is a graceful or forceful termination.

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

Conciseness4/5

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

The description is appropriately brief with no filler. It front-loads the action in the first sentence and uses a standard docstring Args format for the single parameter. The version warning is appropriately placed as a secondary caveat.

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

Completeness3/5

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

Given the tool has only one parameter and an output schema exists (relieving the description from explaining return values), the description is minimally complete. However, for a destructive operation with no annotations, it lacks important context about side effects or data retention that would aid an agent in making informed invocation decisions.

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

Parameters3/5

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

Schema description coverage is 0%, requiring the description to compensate. The Args section provides basic semantics ('Task ID of the scan to cancel'), which minimally compensates for the lack of schema documentation, though it does not clarify the dual-type nature (string/integer) or source of the task_id.

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

Purpose4/5

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

The description clearly states the tool 'Cancel[s] a scan by task_id,' providing a specific verb and resource. However, it does not explicitly differentiate from the sibling tool 'wait_for_scan_completion' regarding when to cancel versus allowing a scan to finish naturally.

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

Usage Guidelines2/5

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

The description notes a version compatibility constraint ('May not be supported by all Burp API versions'), but provides no guidance on when to use cancellation versus alternatives like waiting for completion, nor does it mention prerequisites or data retention implications.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jayluxferro/burp-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server