Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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)
  • 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
  • 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)
  • Pydantic model for paginated API response containing list of Licenses objects.
    class PaginatedLicensesList(PaginatedResponse): results: List[Licenses]
  • 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())

Other Tools

Related Tools

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