Skip to main content
Glama

rotate_secret

Rotate a secret by requesting a fresh credential from the upstream provider and storing it back into the keyring. Use for expiring, leaked, or scheduled rotations.

Instructions

[validation] Ask the upstream provider to issue a fresh credential for this secret and store the new value back into the keyring. Use when a secret is expiring, leaked, or part of a scheduled rotation; prefer generate_secret for self-managed values you fully control, and agent_scan --autoRotate for sweep-style rotation across multiple expired keys. Mutates the keyring with the newly-issued value if rotation succeeds (one 'write' audit event), and makes outbound network requests against the provider's rotation API. Returns JSON { rotated, newValue?, message?, ... }. If rotated is false, the existing value is left untouched.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesExact key to rotate. Must already exist in the keyring.
orgIdNoOrganization identifier for org-scoped secrets. Required only when scope='org'. Example: 'acme-corp'.
scopeNoWhere the secret lives. 'global' = user keyring (default if omitted on reads), 'project' = scoped to projectPath, 'team' = team-shared (needs teamId), 'org' = org-shared (needs orgId).
teamIdNoTeam identifier for team-scoped secrets. Required only when scope='team'. Example: 'acme-platform'.
providerNoForce a specific provider id (see `list_providers`). Omit to auto-detect from the current value or the secret's stored provider hint.
projectPathNoAbsolute path to the project root for project-scoped secrets and policy resolution. Defaults to the MCP server's current working directory when omitted.
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool mutates the keyring with a new value (one write audit event), makes outbound network requests to the provider's rotation API, and returns a specific JSON format. It also notes that if rotated is false, the existing value is left untouched. Could mention error handling more explicitly, but overall transparent.

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?

The description is a single paragraph but well-structured: begins with a [validation] tag, then action, usage guidelines, behavioral notes, and return format. Every sentence adds value, but the structure could be slightly improved with separation of concerns.

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?

Given no output schema, the description provides the return JSON structure. It covers usage, alternatives, behavioral impacts, and return format. All 6 parameters are documented in the schema. Minor gap: does not explicitly mention prerequisites like needing a configured provider, but that is implied.

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 the schema already documents all parameters thoroughly. The description adds minimal additional context beyond what is in the schema (e.g., mentioning provider auto-detection). Baseline 3 is appropriate.

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 action: 'Ask the upstream provider to issue a fresh credential... and store the new value back into the keyring.' It distinguishes from siblings by referencing generate_secret for self-managed values and agent_scan for sweep-style rotation, providing clear differentiation.

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 says when to use: 'when a secret is expiring, leaked, or part of a scheduled rotation.' It also provides alternatives: 'prefer generate_secret for self-managed values you fully control, and agent_scan --autoRotate for sweep-style rotation across multiple expired keys.'

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/I4cTime/quantum_ring'

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