Skip to main content
Glama

request_api_key

Request an API key for a site YOU ARE RUNNING ON (challenge-response).

⚠ ONLY USE THIS IF YOU ARE EXECUTING INSIDE THAT SITE'S OWN CONTAINER. If you bought or ordered the site from somewhere else, this is the wrong tool: it returns "pending" and the pending never resolves, because the proof it asks for is a file you cannot reach. Use get_checkout_status(checkout_id) on the checkout that paid for the site — that hands over the site-scoped key over plain HTTP with no container access. The refusal and the pending response both name it under alternative when one is available.

Two-step verification flow:

  1. A claim token is written into that site's container, at the per-site path the response gives you in claim_path (mode 600, owner admin — readable only from on the container). Do not hardcode the path.

  2. Read that file and call claim_api_key(token) within 1 hour

Refused for sites on SHARED containers. One container there serves up to 40 customers behind one agent, so reading a file proves you are on the machine, not which customer you are — the token would authenticate the wrong thing.

No authentication needed — the proof is reading the file from the container.

Args: site_slug: The site identifier (your BorealHost site slug)

Returns: {"status": "pending", "site_slug": "my-site", "expires_in_seconds": 3600, "claim_path": "/home/admin/.borealhost/.claim_token_my-site", "requires_container_access": true, "instructions": "Read the claim token and call claim_api_key()...", "alternative": {"checkout_id": "...", "command": "bh checkout status ..."}}

Errors: VALIDATION_ERROR: Unknown site slug, no active subscription, shared container, or a key already exists (rotate it, never revoke it to reach this route). Carries alternative when another route works. RATE_LIMITED: Too many pending claim tokens

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "site_slug": "<site_slug>"
    },
    "name": "request_api_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
site_slugYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden, and it delivers: it explains the two-step verification flow, the pending response, the container-local claim path with mode 600, the 1-hour expiry, the shared-container refusal rationale, and the no-authentication requirement. It even details error cases and the alternative field, far exceeding basic mutation disclosure.

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 long but every sentence earns its place. It front-loads the critical container requirement and alternative, then organizes flow, refusal reasoning, args, returns, and errors into scannable sections. The formatting with warnings and numbered steps makes it easy for an agent to parse and act on.

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

Completeness5/5

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

Given the tool's complexity, zero annotations, and no output schema, the description is remarkably complete: it explains prerequisites, steps, expected return fields, error conditions, and fallback routing via the alternative field. An agent has everything needed to decide whether to call it and how to proceed afterward.

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?

The schema provides only 'Site Slug' with no description (coverage 0%). The description compensates by explaining site_slug as 'The site identifier (your BorealHost site slug)', adding meaning beyond the raw title. For a single straightforward parameter this is sufficient, though a concrete example would be slightly stronger.

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

Purpose5/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: 'Request an API key for a site YOU ARE RUNNING ON (challenge-response)'. It specifies the exact resource (site API key) and the challenge-response mechanism, and it stands apart from siblings like create_api_key, claim_api_key, and get_checkout_status. It also explicitly tells when this is the wrong tool and names the correct alternative, making the purpose unmistakable.

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

Usage Guidelines5/5

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

The description gives explicit when-to-use and when-not-to-use guidance: only when executing inside the site's own container. It names get_checkout_status(checkout_id) as the alternative for purchased sites and explains why. It also warns about shared containers and the 1-hour claim deadline. No inference is required from the agent.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.