Skip to main content
Glama

Rotate a domain API key

rotate_domain_api_key
Destructive

Replace a compromised or expiring domain API key with a new value while retiring the old key, optionally keeping it active for a grace period.

Instructions

Issues a brand-new key value for an existing domain API key slot and retires the old value — use this for a compromised or routinely-expiring key without having to update every caller's key id. By default the old key is deactivated immediately; pass keepOldKeyActive:true (with an optional gracePeriodMinutes) to let both work for a transition window. The response's new plaintext apiKey is shown EXACTLY ONCE — surface it to the user immediately. 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>",
      "keyId": "<keyId>"
    },
    "name": "rotate_domain_api_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyIdYesThe key's id — from list_domain_api_keys.
confirmNoMust be true to rotate. Omit/false returns a preview only.
domainIdYesThe domain's id — from list_domains.
keepOldKeyActiveNoKeep the old key working for a grace period instead of deactivating it immediately.
gracePeriodMinutesNoHow long the old key stays active when keepOldKeyActive is true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.53.0

TDQS

A4.6/5.0
Behavior5/5

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

The only annotation is destructiveHint=true; the description supplies the critical consequences it does not cover: the old key is deactivated immediately by default, an optional grace window exists, and the plaintext apiKey is returned exactly once. The confirm=true gate with preview-only behavior is also disclosed, which is exactly the risk information a destructive rotation needs.

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

Conciseness4/5

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

Effect and default behavior are front-loaded, followed by the transition-window override and the confirm protocol in priority order. It is dense and parenthetical-heavy ('(with an optional gracePeriodMinutes)'), but no sentence is filler.

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?

There is no output schema, and the description compensates by describing the key return value (one-time plaintext apiKey) and telling the agent to surface it immediately. Combined with the confirm workflow and grace-window semantics, an agent has everything needed to invoke this destructive tool safely.

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 coverage is 100%, so baseline is 3, but the description adds real meaning: it explains that keepOldKeyActive interacts with gracePeriodMinutes as a transition window, and that confirm=false yields a preview rather than an error. It does not restate the id sourcing (already in schema), which is fine.

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?

States a specific verb and resource ('Issues a brand-new key value for an existing domain API key slot and retires the old value') and clarifies the key distinction from in-place update tools: the caller's key id stays the same. An agent can immediately tell this apart from update_domain_api_key or create_domain_api_key.

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

Usage Guidelines4/5

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

Explicitly names the triggering scenarios ('a compromised or routinely-expiring key'), and the confirm-preview-first workflow gives concrete call sequencing. It stops short of stating when NOT to use it (e.g. when the key id itself must change, use create/delete instead), so alternatives are only implied.

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