list_licenses
View license usage and limits for Intruder account infrastructure and application targets, showing active allocations for 30-day periods.
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 primary handler function for the 'list_licenses' MCP tool. It is registered via the @mcp.tool() decorator and implements the core logic: fetching all licenses from the IntruderAPI client and formatting them into a human-readable string showing infrastructure and application license usage.@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/api_client.py:118-127 (helper)Supporting generator function in the IntruderAPI class that fetches all licenses by handling pagination over the /licenses/ API endpoint using the list_licenses method.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)