Skip to main content
Glama

list_api_keys

Retrieve all API keys and their metadata for a specified project on the MCP Server for Coroot, aiding in key management and observability integration.

Instructions

List all API keys for a project.

Returns all API keys with their metadata (but not the secret values).

Args: project_id: Project ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes

Implementation Reference

  • Registers the 'list_api_keys' MCP tool using the FastMCP @mcp.tool() decorator. The schema is inferred from the function signature (project_id: str) and docstring.
    @mcp.tool() async def list_api_keys(project_id: str) -> dict[str, Any]: """List all API keys for a project. Returns all API keys with their metadata (but not the secret values). Args: project_id: Project ID """ return await list_api_keys_impl(project_id) # type: ignore[no-any-return]
  • Primary MCP tool handler that invokes CorootClient.list_api_keys(), applies error handling via @handle_errors decorator, and formats the success response.
    async def list_api_keys_impl(project_id: str) -> dict[str, Any]: """List API keys.""" keys = await get_client().list_api_keys(project_id) return { "success": True, "api_keys": keys, }
  • CorootClient.list_api_keys method implementing the core logic: sends GET request to Coroot API endpoint /api/project/{project_id}/api_keys and returns parsed JSON response.
    async def list_api_keys(self, project_id: str) -> dict[str, Any]: """List API keys for a project. Args: project_id: Project ID. Returns: List of API keys. """ response = await self._request("GET", f"/api/project/{project_id}/api_keys") data: dict[str, Any] = response.json() return data

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/jamesbrink/mcp-coroot'

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