Skip to main content
Glama

keyRotate

Gives a key a new secret and keeps its id and label. The old secret stops working at once, over HTTP and MCP, and the key's lastUsedAt is null until the new secret is used.

  • Cost: Free. Signed by the owner over method POST, path /account/v1/<address lowercased>/key/<id>/rotate and no body (the hash of no bytes). The ARCGATE-KEY header does not authorize it: a call with only a key is a 401 signature_required.

  • Inputs: address and id (path). No body.

  • Returns: the id, the label and the new key, shown only now.

  • Errors:

    • 404 account_not_found: the address has no account.

    • 404 key_not_found: the account has no key with that id. It was never made, was revoked, or is another account's.

  • Next:

    • keyList: read the account's keys.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesA key's id, `key_` and 22 base64url characters, as `keyCreate` and `keyList` answer it. It is not the secret.
addressYesThe account owner's address, any letter case. One account per address, and a signed request must be signed by it.
agentSignatureNoThe owner's EIP-712 signature over this request, as the AGENT-SIGNATURE, AGENT-NONCE and AGENT-EXPIRY headers carry it over HTTP. Sign the typed data `AccountRequest` (not `AgentRequest`) with fields `origin` (the API's base URL with no trailing slash: the URL this request is sent to less its path, for example `https://api.arcgate.dev`; over MCP the same, not the /mcp URL), `address` (the owner), `method`, `path`, `bodyHash`, `nonce` and `expiry`, in that order. A signature made for another deployment's origin is a 401 invalid_signature, under the domain {name: "arcgate", version: "1"} with no chainId (a wallet that can only sign with one may add the chainId of the chain this deployment serves). The `path` is the request path with the address lowercased. The `bodyHash` is the keccak256 of the canonical JSON of the body you send (sorted keys, no whitespace), or of no bytes when there is none. Each nonce is accepted once per owner. Omitting it is a 401 signature_required, never a charge.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and delivers: it is free, it requires an owner EIP-712 signature (not the ARCGATE-KEY header, which yields 401 signature_required), the old secret dies immediately over both HTTP and MCP, lastUsedAt is null until first use, and it enumerates both 404 error codes. This goes well beyond what any caller could infer.

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?

The core behavior is front-loaded in the first sentence, then organized into tight labeled sections (Cost, Inputs, Returns, Errors, Next) so an agent can scan to the section it needs. Length is justified by the absent annotations and no wasted prose.

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 signed mutation tool with three parameters, a nested signature object, and no output schema, the description covers inputs, return value (id, label, new key shown only once), cost, authorization, and failure modes. Nothing an agent needs to call it correctly is 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 description coverage is 100% and the agentSignature nested object is exhaustively documented in the schema, so the baseline is 3. The description adds operative detail the schema does not surface as prominently: address and id are path parameters, there is no body, and therefore the bodyHash is the hash of no bytes — all of which determine how the signature must be built.

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 opening sentence gives a specific verb (rotate/replace the secret) and resource (key), and critically distinguishes the operation from keyRevoke by stating the id and label are preserved. An agent can tell it apart from keyRevoke and keyCreate without opening any 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?

The description establishes clear context for when to use it (replace a compromised or stale secret while keeping the key's identity) and provides a follow-up route ('Next: keyList'). It stops short of explicitly naming keyRevoke or keyCreate as the alternatives to pick instead, so the when-not guidance is left to inference.

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