Skip to main content
Glama
jamesbrink

MCP Server for Coroot

create_api_key

Generate API keys for sending metrics and data to Coroot observability platform. The secret key is provided only once during creation.

Instructions

Create a new API key for data ingestion.

Creates an API key that can be used for sending metrics and data. The key secret is only returned once during creation.

Args: project_id: Project ID name: API key name description: Optional description

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
nameYes
descriptionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main MCP tool handler function for 'create_api_key', decorated with @mcp.tool(). It delegates to the internal implementation helper.
    @mcp.tool()
    async def create_api_key(
        project_id: str, name: str, description: str | None = None
    ) -> dict[str, Any]:
        """Create a new API key for data ingestion.
    
        Creates an API key that can be used for sending metrics and data.
        The key secret is only returned once during creation.
    
        Args:
            project_id: Project ID
            name: API key name
            description: Optional description
        """
        return await create_api_key_impl(project_id, name, description)  # type: ignore[no-any-return]
  • Internal helper function that handles errors and calls the CorootClient.create_api_key method.
    async def create_api_key_impl(
        project_id: str, name: str, description: str | None = None
    ) -> dict[str, Any]:
        """Create an API key."""
        result = await get_client().create_api_key(project_id, name, description)
        return {
            "success": True,
            "message": "API key created successfully",
            "api_key": result,
        }
  • CorootClient class method that performs the actual HTTP POST request to the Coroot API to generate a new API key.
    async def create_api_key(
        self, project_id: str, name: str, description: str | None = None
    ) -> dict[str, Any]:
        """Create a new API key.
    
        Args:
            project_id: Project ID.
            name: API key name (used as description in Coroot).
            description: Optional description (not used by Coroot).
    
        Returns:
            Created API key with secret.
        """
        # Coroot expects 'action' and 'description' fields
        data = {
            "action": "generate",
            "description": name,  # Coroot uses 'description' not 'name'
        }
    
        response = await self._request(
            "POST",
            f"/api/project/{project_id}/api_keys",
            json=data,
        )
        return self._parse_json_response(response)
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses a key behavioral trait: 'The key secret is only returned once during creation,' which is critical for security and usage. However, it lacks other important details like authentication requirements, rate limits, error conditions, or whether the operation is idempotent. This partial disclosure justifies a score of 3.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded: the first sentence states the core purpose, followed by key behavioral detail, and then parameter semantics in a structured 'Args:' section. Every sentence adds value without redundancy, making it efficient and well-organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a mutation with security implications), no annotations, and an output schema (which handles return values), the description is reasonably complete. It covers purpose, a critical behavioral trait, and parameter semantics. However, it lacks context on permissions, error handling, or integration with sibling tools, leaving minor gaps for a mutation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds semantic meaning for all three parameters: 'project_id: Project ID', 'name: API key name', and 'description: Optional description.' This clarifies their roles beyond the schema's basic types. However, it doesn't provide format examples (e.g., length limits for 'name') or deeper context, preventing a score of 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Create a new API key for data ingestion' and 'Creates an API key that can be used for sending metrics and data.' It specifies the verb ('Create') and resource ('API key'), and distinguishes it from sibling tools like 'delete_api_key' and 'list_api_keys'. However, it doesn't explicitly differentiate from other creation tools like 'create_project' or 'create_user', which is why it's not a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a project first), exclusions, or compare it to sibling tools like 'configure_integration' or 'list_api_keys'. The only implied usage is for data ingestion, but this is vague and lacks explicit context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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