get_scan
Retrieve detailed information for a specific scan by providing its unique scan ID using the intruder-mcp server's dedicated tool.
Instructions
Get details of a specific scan.
Args:
scan_id: The ID of the scan to get
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scan_id | Yes |
Input Schema (JSON Schema)
{
"properties": {
"scan_id": {
"title": "Scan Id",
"type": "integer"
}
},
"required": [
"scan_id"
],
"title": "get_scanArguments",
"type": "object"
}
Implementation Reference
- intruder_mcp/server.py:156-180 (handler)MCP tool handler for 'get_scan': fetches and formats scan details using the API client.@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)API client helper that performs the HTTP GET request to retrieve scan details from 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/server.py:156-156 (registration)The @mcp.tool() decorator registers the get_scan function as an MCP tool.@mcp.tool()