Skip to main content
Glama

Create a domain API key

create_domain_api_key
Destructive

Creates a new API key on a domain so callers can authenticate to non-anonymous endpoints via Bearer token or query code. Returns the plaintext key once, so copy it immediately.

Instructions

Mints a new API key on a domain — the credential callers pass as Authorization: Bearer (or ?code=) to call a non-anonymous endpoint deployed in that domain. The response's plaintext apiKey is shown EXACTLY ONCE and can never be retrieved again — surface it to the user immediately and tell them to copy it now. Powerful: requires confirm=true — first call WITHOUT confirm to preview, then again with confirm:true.

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": {
      "domainId": "<domainId>"
    },
    "name": "create_domain_api_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoHuman-readable label for the key.
confirmNoMust be true to create. Omit/false returns a preview only.
domainIdYesThe domain's id — from list_domains.
expiresAtNoISO 8601 expiry, e.g. "2026-12-31T00:00:00Z". Omit for no expiry.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.53.0

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the `destructiveHint=true` annotation, the description discloses the critical behavioral trait: the plaintext `apiKey` in the response is shown exactly once and can never be retrieved again, so it must be surfaced to the user immediately. It also flags the tool as "Powerful" and requires the confirm flag, matching the destructive annotation. This is exactly the kind of irreversibility and post-call obligation the annotation alone cannot convey.

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?

Three tightly packed sentences with zero filler: what is minted and why it matters, the once-only reveal warning, then the confirm workflow. The irreversible-reveal caution and the two-step confirm are both front-loaded where an agent will act on them. Dashes and capitalization are used deliberately to emphasize the stakes.

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?

With no output schema, the description correctly takes on the burden of explaining the return value (the plaintext `apiKey` and its one-time visibility). Combined with the confirm two-step and the credential's usage form, an agent has everything needed to call this correctly and handle the result safely. Nothing material is left unspecified for a 4-parameter create tool.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter (`name`, `confirm`, `domainId`, `expiresAt`) is already documented in the schema, which sets the baseline at 3. The description reinforces the `confirm` semantics (preview without it, create with `confirm:true`) but adds no new detail about `expiresAt` format or `domainId` sourcing beyond what the schema states. It does not compensate for anything, but nothing is missing either.

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 gives a precise verb-and-resource ("Mints a new API key on a domain") and explains what the resulting credential is for — passed as `Authorization: Bearer <key>` or `?code=<key>` to non-anonymous endpoints. That level of specificity lets an agent distinguish creating a key from rotating or deleting one. It stops short of naming any sibling tool explicitly, so it lands at 4 rather than 5.

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

Usage Guidelines3/5

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

Strong procedural guidance is present: call once without `confirm` to preview, then again with `confirm:true`, and surface the plaintext key immediately. However, there is no guidance on when to choose this tool over neighbors such as `rotate_domain_api_key`, `update_domain_api_key`, or `create_domain_client`, and no stated prerequisites or when-not conditions. Usage is therefore implied and procedural rather than comparative.

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