Skip to main content
Glama

delete_api_key

Remove and deactivate an API key from a project in the MCP Server for Coroot to enhance security and manage access effectively. Requires project ID and the key string. Action is irreversible.

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
keyYes
project_idYes

Implementation Reference

  • MCP tool handler function decorated with @mcp.tool() that implements the delete_api_key tool by delegating to the internal impl function.
    @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]
  • CorootClient.delete_api_key method that makes the HTTP POST request to Coroot API to delete the specified API 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)
  • Internal implementation function wrapped with error handling that calls the client method and formats the 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", }
  • The @mcp.tool() decorator registers the delete_api_key function as an MCP tool.
    @mcp.tool()

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