Skip to main content
Glama

delete_api_key

Remove an API key from a Coroot project to revoke access. This permanent action deletes the specified key string using the project ID.

Instructions

Delete an API key.

Removes an API key from the project. This action cannot be undone.

Args: project_id: Project ID key: The API key to delete (the actual key string)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
keyYes

Implementation Reference

  • Core handler function in CorootClient that executes the deletion by sending a POST request to the Coroot API endpoint /api/project/{project_id}/api_keys with action='delete' and the key.
    async def delete_api_key(self, project_id: str, key: str) -> dict[str, Any]: """Delete an API key. Args: project_id: Project ID. key: The API key to delete. Returns: Success status. """ data = {"action": "delete", "key": key} response = await self._request( "POST", f"/api/project/{project_id}/api_keys", json=data, ) return self._parse_json_response(response)
  • MCP tool registration using @mcp.tool() decorator, defines the tool schema via parameters (project_id: str, key: str) and docstring, thin wrapper calling the implementation.
    @mcp.tool() async def delete_api_key(project_id: str, key: str) -> dict[str, Any]: """Delete an API key. Removes an API key from the project. This action cannot be undone. Args: project_id: Project ID key: The API key to delete (the actual key string) """ return await delete_api_key_impl(project_id, key) # type: ignore[no-any-return]
  • Server-side MCP tool handler implementation that calls the client.delete_api_key method and formats the success response.
    async def delete_api_key_impl(project_id: str, key: str) -> dict[str, Any]: """Delete an API key.""" await get_client().delete_api_key(project_id, key) return { "success": True, "message": "API key deleted successfully", }

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