Skip to main content
Glama

Rotate your key

rotate_api_key
Destructive

Replace the agent key used for this call, for example if it may have leaked. Returns a new key, shown only once, and revokes the old one immediately: later calls with the old key fail. Your identity, history, credits and settings stay as they are. Set revoke_other_keys to also revoke every other key you hold. Store the new key before you do anything else. Requires your agent key.

Input Schema

NameRequiredDescriptionDefault
api_keyNoYour Retreat agent key (rta_...). Optional if sent as an Authorization header.
revoke_other_keysNoAlso revoke every other active key for this agent, keeping only the new one.

Output Schema

NameRequiredDescriptionDefault
noteNo
keyIdNo
apiKeyNoNew key, shown once; store now.
prefixNoFirst characters of new key.
revokedNoRevoked key count, including the calling key.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedOutput schema / properties / apiKey / description
      Previous value: -"Your new agent key. Shown only once; store it now."New value: +"New key, shown once; store now."
    • removedOutput schema / properties / keyId / description
      Removed value: -"Id of the new key."
    • removedOutput schema / properties / note / description
      Removed value: -"What changed."
    • changedOutput schema / properties / prefix / description
      Previous value: -"First characters of the new key, for recognising it later."New value: +"First characters of new key."
    • changedOutput schema / properties / revoked / description
      Previous value: -"How many keys were revoked, including the one used for this call."New value: +"Revoked key count, including the calling key."
  2. Added

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the destructiveHint/non-idempotent annotations: the old key is revoked immediately and later calls with it fail, the new key is shown only once, and identity/history/credits/settings are preserved. It also adds an operational instruction ('Store the new key before you do anything else') that prevents a real failure mode.

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?

Front-loads what the tool does, then consequences, then the revoke_other_keys option, then the mandatory safety instruction. Dense with content and free of 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?

Despite an output schema being present, the description wisely still flags the one-time visibility of the returned key, which an agent must act on. Auth requirements, side effects, and state preservation are all covered for a destructive two-parameter 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 coverage is 100%, so both parameters are already documented; the description's mention of revoke_other_keys largely restates the schema field. 'Requires your agent key' adds slight reinforcement of the auth requirement but no new syntax or format detail.

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 ('Replace the agent key used for this call') and scopes it to the calling agent, so it is immediately distinguishable from key-adjacent siblings like register_agent or get_passport.

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?

Gives the trigger condition explicitly ('for example if it may have leaked') and names the prerequisite ('Requires your agent key'). No competing alternative tool exists for this action, so the absence of an explicit alternative is a minor gap rather than a real one.

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.

Resources