list_licenses
Retrieve license details for Intruder account, including usage and limits for infrastructure and application licenses. Licenses are tied to specific targets for 30 days upon activation.
Instructions
List license information for the Intruder account. Shows usage and limits for infrastructure and application licenses. When a license is used, it is tied to the target that used it for 30 days.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- intruder_mcp/server.py:242-260 (handler)The tool handler for 'list_licenses', decorated with @mcp.tool() for automatic registration. It fetches all licenses using the API client and formats them into a readable string output.@mcp.tool() async def list_licenses() -> str: """ List license information for the Intruder account. Shows usage and limits for infrastructure and application licenses. When a license is used, it is tied to the target that used it for 30 days. """ licenses = api.list_licenses_all() formatted = [] for license in licenses: formatted.append("Infrastructure Licenses:") formatted.append(f" Total: {license.total_infrastructure_licenses}") formatted.append(f" Available: {license.available_infrastructure_licenses}") formatted.append(f" Consumed: {license.consumed_infrastructure_licenses}") formatted.append("") formatted.append("Application Licenses:") formatted.append(f" Total: {license.total_application_licenses}") formatted.append(f" Available: {license.available_application_licenses}") formatted.append(f" Consumed: {license.consumed_application_licenses}") formatted.append("") return "\n".join(formatted)
- intruder_mcp/enums.py:177-183 (schema)Pydantic BaseModel defining the schema/structure of the Licenses data object used in the API responses and by the tool.class Licenses(BaseModel): total_infrastructure_licenses: int available_infrastructure_licenses: int consumed_infrastructure_licenses: int total_application_licenses: int available_application_licenses: int consumed_application_licenses: int
- intruder_mcp/api_client.py:118-127 (helper)Helper utility in the IntruderAPI client that paginates and yields all license objects, called directly by the tool handler.def list_licenses_all(self) -> Generator[Licenses, None, None]: offset = 0 while True: response = self.list_licenses(limit=100, offset=offset) for license in response.results: yield license if not response.next: break offset += len(response.results)
- intruder_mcp/enums.py:255-256 (schema)Pydantic model for paginated API response containing list of Licenses objects.class PaginatedLicensesList(PaginatedResponse): results: List[Licenses]
- intruder_mcp/api_client.py:110-116 (helper)Core API client method that queries the /licenses/ endpoint with pagination parameters, used by list_licenses_all.def list_licenses(self, limit: Optional[int] = None, offset: Optional[int] = None) -> PaginatedLicensesList: params = {} if limit: params["limit"] = limit if offset: params["offset"] = offset return PaginatedLicensesList(**self.client.get(f"{self.base_url}/licenses/", params=params).json())