Skip to main content
Glama

list_targets

Retrieve detailed information about all targets in your Intruder account, including IDs and statuses such as 'live', 'unscanned', or 'unresponsive', for efficient target management.

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

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "title": "list_targetsArguments", "type": "object" }

Implementation Reference

  • The main handler for the 'list_targets' tool, registered via @mcp.tool() decorator. It calls the API helper to list all targets and formats the output as a string.
    @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)
  • Supporting helper method in 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)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/intruder-io/intruder-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server