cancel_scan
Stop a running scan by providing its ID. Use this to abort scans that are no longer needed.
Instructions
Cancel a running scan.
Args:
scan_id: The ID of the scan to cancel
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scan_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- intruder_mcp/server.py:188-197 (handler)The MCP tool handler that exposes 'cancel_scan'. It calls api.cancel_scan() and returns a confirmation string.
@mcp.tool() async def cancel_scan(scan_id: int) -> str: """ Cancel a running scan. Args: scan_id: The ID of the scan to cancel """ result = api.cancel_scan(scan_id) return f"Cancelled scan {scan_id}: {result}" - intruder_mcp/api_client.py:190-191 (helper)API client method that sends a POST request to /scans/{scan_id}/cancel/ endpoint to cancel a running scan.
def cancel_scan(self, scan_id: int) -> str: return self.client.post(f"{self.base_url}/scans/{scan_id}/cancel/").text - intruder_mcp/server.py:188-188 (registration)FastMCP decorator registering 'cancel_scan' as an MCP tool.
@mcp.tool()