Skip to main content
Glama

Rotate Agent Key

rotate_key
Read-onlyIdempotent

Rotate an agent's Ed25519 key in planned overlap or emergency retirement mode, generating a new key pair and returning rotation state without persisting data.

Instructions

Rotate an agent's Ed25519 key. Planned mode: configurable overlap (default 24h). Emergency mode: immediate old-key retirement. Builds a rotated DID document for the old key, generates a new key pair, and returns a text summary with the rotation state, the first 16 hex characters of the old and new public keys, the full new private key (redacted on a remote server, MCP_TRANSPORT=sse or MCP_REMOTE=1, as in generate_keys), the DID, the rotation log entry count, and the activation time. The DID document itself is not returned, and nothing is persisted. Delegation revocation is not integrated in this server, so a non-empty delegation_ids_to_revoke is refused before any key is generated.

Input Schema

NameRequiredDescriptionDefault
modeYes
agent_nameNoAgent name for the passport (default: current session)
old_private_keyYesHex-encoded private key being rotated FROM
activation_delay_hoursNoPlanned mode overlap hours (default: 24)
delegation_ids_to_revokeNoMust be empty or absent. Delegation revocation is not integrated in this server, so a non-empty list is refused and nothing is rotated.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv8.0.0
    • changedInput schema / properties / delegation_ids_to_revoke / description
      Previous value: -"Delegation IDs to cascade-revoke during rotation"New value: +"Must be empty or absent. Delegation revocation is not integrated in this server, so a non-empty list is refused and nothing is rotated."
  2. Changed2 schema fields changedv4.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
  3. Addedv2.8.0

TDQS

A4.6/5.0
Behavior5/5

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

With readOnlyHint=true and destructiveHint=false already asserted, the description supplies the missing behavioral context that reconciles them: 'nothing is persisted', the DID document is not returned, copy counts out to a text summary, the full new private key is redacted under MCP_TRANSPORT=sse or MCP_REMOTE=1, and a non-empty delegation_ids_to_revoke is refused before any key is generated. That pre-empts the most likely operational surprises (remote redaction, hard refusal) far beyond what the annotations convey.

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 purpose and mode semantics are front-loaded, and every subsequent clause covers a distinct, genuinely useful fact (returned fields, redaction, non-persistence, refusal path). It is denser and longer than most definitions, but the length is earned by the number of edge cases it discloses.

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, so the description correctly carries the entire return-value burden and enumerates the summary contents (rotation state, key prefixes, DID, log entry count, activation time) plus the redaction and refusal behaviors. Nothing an agent needs to call this mutation-shaped computation safely appears to be missing.

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 80% and the enum on 'mode' is self-documenting, so the baseline is already 3; the description adds meaning on top by spelling out what planned vs emergency actually do and by restating the delegation_ids_to_revoke refusal rule in prose. It leaves activation_delay_hours and agent_name to the schema, so it is additive but not exhaustive.

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 ('Rotate an agent's Ed25519 key') plus the two operational modes, immediately distinguishing it from generate_keys and the read-only rotation helpers (verify_rotation_chain, is_key_active). An agent knows exactly what the call performs and what it produces without opening the schema.

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?

It gives real when-to-use context by contrasting 'Planned mode: configurable overlap (default 24h)' against 'Emergency mode: immediate old-key retirement', so an agent can pick a mode. It does not, however, name the sibling alternative (e.g. generate_keys for a fresh identity) or state when not to rotate at all, so it stops short of full routing guidance.

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

Deploy Server

Other Tools