Skip to main content
Glama

api-key-rotate

Rotate API keys by revoking old credentials and issuing new ones, with configurable grace periods to maintain service continuity. Save the new key immediately.

Instructions

Rotate a platform API key by revoking the old key and issuing a new one. The new key value is returned ONLY in this response, so save it immediately. An optional grace period keeps the old key valid during transition. Use this for periodic key rotation or when a key may be compromised but you need continuity. Requires scope: settings:write. For immediate revocation without replacement, use api-key-revoke instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hashYesAPI key hash to rotate
gracePeriodHoursNoHours the old key remains valid after rotation (default: 24)
Behavior4/5

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

With no annotations provided, the description carries full burden and discloses critical behaviors: the old key is revoked, new key appears ONLY in this response, grace period maintains continuity, and specific auth scope is required. Could clarify atomicity or failure rollback behavior.

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?

Six sentences each delivering distinct value: action definition, output warning, grace period behavior, use cases, auth requirement, and sibling distinction. No redundancy, well front-loaded.

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 no output schema, the description compensates by warning that the new key appears ONLY in the response. No annotations are present but the description covers scope requirements, side effects, and sibling relationships adequately for a 2-parameter mutation tool.

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 has 100% coverage (baseline 3). The description adds semantic value by explaining that gracePeriodHours enables 'transition' continuity and warning that the hash identifies the key to rotate, enriching the raw schema definitions.

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 specific action (rotate by revoking old and issuing new), identifies the resource (platform API key), and distinguishes from siblings by contrasting with api-key-revoke for immediate revocation without replacement.

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?

Explicitly states when to use ('periodic key rotation' or 'compromised but need continuity'), names the alternative tool ('use api-key-revoke instead'), and specifies the required scope ('settings:write').

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ebenezer-isaac/llmconveyors-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server