Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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)
  • 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)
  • The @mcp.tool() decorator registers the list_targets function as an MCP tool.
    @mcp.tool()

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