get_scan
Retrieve detailed results and status for a specific Intruder.IO security scan by providing its scan ID.
Instructions
Get details of a specific scan.
Args:
scan_id: The ID of the scan to get
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scan_id | Yes |
Implementation Reference
- intruder_mcp/server.py:156-180 (handler)The @mcp.tool()-decorated handler function for 'get_scan'. It retrieves scan details from the IntruderAPI and formats them into a human-readable string.@mcp.tool() async def get_scan(scan_id: int) -> str: """ Get details of a specific scan. Args: scan_id: The ID of the scan to get """ scan = api.get_scan(scan_id) details = [ f"Scan {scan.id} ({scan.scan_type})", f"Status: {scan.status}", f"Schedule: {scan.schedule_period}", f"Created: {scan.created_at}", f"Type: {scan.scan_type}" ] if scan.start_time: details.append(f"Started: {scan.start_time}") if scan.completed_time: details.append(f"Completed: {scan.completed_time}") if scan.target_addresses: details.append("\nTargets:") details.extend(f"- {addr}" for addr in scan.target_addresses) return "\n".join(details)
- intruder_mcp/api_client.py:185-186 (helper)Helper method in IntruderAPI client that fetches the scan data via HTTP GET request to the Intruder API.def get_scan(self, scan_id: int) -> Scan: return Scan(**self.client.get(f"{self.base_url}/scans/{scan_id}/").json())
- intruder_mcp/enums.py:125-134 (schema)Pydantic BaseModel defining the structure of the Scan object used by get_scan.class Scan(BaseModel): id: int status: ScanStatusField created_at: datetime target_addresses: Optional[List[str]] = None scan_type: ScanTypeEnum schedule_period: SchedulePeriodEnum start_time: Optional[datetime] = None completed_time: Optional[datetime] = None
- intruder_mcp/server.py:156-156 (registration)The @mcp.tool() decorator registers the get_scan function as an MCP tool.@mcp.tool()