list-all-scans
Retrieve and display all stored network scan results to review previous security assessments and analyze network configurations.
Instructions
List all available scan results
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/nmap_mcp/server.py:381-404 (handler)The handler logic within the call_tool function that executes the 'list-all-scans' tool by iterating over stored scan_results and formatting a list of available scans.elif name == "list-all-scans": if not scan_results: return [ types.TextContent( type="text", text="No scans have been performed yet.", ) ] scan_list = [] for scan_id, scan_data in scan_results.items(): hosts_count = len(scan_data.get("hosts", [])) scan_list.append(f"- Scan ID: {scan_id}") scan_list.append(f" Target: {scan_data.get('target')}") scan_list.append(f" Options: {scan_data.get('options')}") scan_list.append(f" Hosts: {hosts_count}") scan_list.append("") return [ types.TextContent( type="text", text="Available scans:\n\n" + "\n".join(scan_list), ) ]
- src/nmap_mcp/server.py:171-178 (registration)Registration of the 'list-all-scans' tool in the list_tools decorator, including its description and empty input schema.types.Tool( name="list-all-scans", description="List all available scan results", inputSchema={ "type": "object", "properties": {}, }, )
- src/nmap_mcp/server.py:171-178 (schema)Input schema definition for the 'list-all-scans' tool, which requires no properties (empty object).types.Tool( name="list-all-scans", description="List all available scan results", inputSchema={ "type": "object", "properties": {}, }, )