Skip to main content
Glama

Replace a management token (free, token or signature)

token_rotate
Destructive

Free: makes a new token for a zone or hostname; the old one stops working at once. Use it when a token may have leaked (tokens pass through model context). Authorize with the current token or, for an object in your account, with nip98. The new token is shown once. Called without nip98 it returns signature_required: the exact URL, method and body to sign, the body's sha256 and an unsigned kind 27235 event template (with proof of work for accounts without a paid order). Sign that, then call again with the same arguments plus nip98. Each signed event works once, within 60 s. Secrets that are ours to receive: object tokens, account API keys (jdk_), signed NIP-98 events; never a private key (nsec or 64 hex characters), wallet connection string or seed words. A raw hex key or seed words inside a sentence cannot be caught here.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "kind": "<kind>",
      "name": "<name>"
    },
    "name": "token_rotate"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYesWhat the token belongs to.
nameYesThe zone, hostname.
nip98NoThe signed NIP-98 event (base64 of its JSON) for exactly the request the signature_required answer of the same call named. Sign it with your own Nostr signer (local key, NIP-46 bunker or a signer tool); never send the private key itself, in any form (nsec, hex or seed words).
tokenNoThe current token; or give nip98 (the owning account).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: the old token stops working at once, the new token is shown only once, unauthenticated calls return a signature_required payload with a specific structure, and each signed event is single-use within 60 seconds. These are exactly the consequences an agent needs before invoking a destructive operation.

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?

Front-loaded with the core effect and the when-to-use trigger, followed by the auth flow. It is long, and the security guidance about secrets sits slightly apart from the call mechanics, but nearly every sentence carries operational value.

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?

For a complex two-step authentication tool with no output schema, the description covers the return behavior, the one-time token display, the signature_required response contents, replay limits, and the accepted credential types. Nothing an agent needs to invoke it correctly 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 100%, so baseline is 3; the description nonetheless adds meaning by clarifying that `token` is the current token and that `nip98` must sign the exact request named in the previous signature_required response. It also warns that private keys must never be supplied in any parameter.

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 — makes a new token for a zone or hostname and immediately invalidates the old one. An agent can tell exactly what the tool does and its scope 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?

Explicitly says when to use it: 'Use it when a token may have leaked (tokens pass through model context).' It also explains the two-step signature flow for callers without a token. It does not name alternatives, but no sibling tool offers token rotation, so the omission is minor.

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