list_targets
Retrieve all targets in your Intruder account with their IDs and current status to monitor scanning progress and manage security assessments.
Instructions
List all targets in the Intruder account and their associated IDs and status (one of 'live', 'license_exceeded', 'unscanned', 'unresponsive', 'agent_uninstalled').
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- intruder_mcp/server.py:29-37 (handler)The handler function for the 'list_targets' MCP tool. It is decorated with @mcp.tool() which registers it, fetches all targets via the API client, formats them as a string list, and returns it.@mcp.tool() async def list_targets() -> str: """ List all targets in the Intruder account and their associated IDs and status (one of 'live', 'license_exceeded', 'unscanned', 'unresponsive', 'agent_uninstalled'). """ targets = api.list_targets_all() formatted = [f"{target.id} - {target.address} ({target.target_status})" for target in targets] return "\n".join(formatted)
- intruder_mcp/api_client.py:169-179 (helper)Supporting helper method in the IntruderAPI class that implements pagination to retrieve all targets by repeatedly calling the paginated list_targets API endpoint.def list_targets_all(self, address: Optional[str] = None, target_status: Optional[str] = None) -> Generator[Target, None, None]: offset = 0 while True: response = self.list_targets(address=address, target_status=target_status, limit=100, offset=offset) for target in response.results: yield target if not response.next: break offset += len(response.results)
- intruder_mcp/server.py:29-29 (registration)The @mcp.tool() decorator registers the list_targets function as an MCP tool.@mcp.tool()