Skip to main content
Glama

Rotate API key

rotate_api_key

Creates a replacement with the same scopes and returns the secret once; the old key keeps working until you revoke it.

Input Schema

NameRequiredDescriptionDefault
keyIdYesKey id
organizationIdNoApproved workspace id only.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare non-read-only, non-destructive, non-idempotent; the description adds genuinely new behavioral facts beyond them: the new key inherits the old key's scopes, the secret is returned only once (so it must be captured immediately), and the old key is NOT invalidated automatically. Missing only edge context such as rate limits or whether repeated rotation is allowed while the prior key lives.

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?

One sentence, front-loaded with the action and the two facts that most affect correct use (secret shown once, old key still live). No filler.

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?

With only two fully-described parameters and no output schema, the definition covers what the tool produces (a secret, once) and the post-call state (old key still active). It would be complete at 5 with an explicit pointer to revoke_api_key for the cleanup step and any permission requirement.

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 both keyId and organizationId are already documented ('Approved workspace id only'). The description adds no syntax, format, or constraint details about either parameter, so the baseline 3 applies.

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?

States the specific effect: creates a replacement key with the same scopes and returns its secret. The 'old key keeps working until you revoke it' clause makes the rotation semantics unambiguous. It falls short of 5 because it never names the sibling tools it sits between (create_api_key, revoke_api_key), so the agent has to infer the distinction.

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?

Rotation intent is implied by 'replacement' and the note that the old key survives until revoked, but there is no explicit when-to-use-this-vs-create_api_key guidance and no stated prerequisites (e.g. permission to rotate, whether keyId must belong to the caller). Usage is inferable rather than instructed.

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.