Skip to main content
Glama
@proof-holdings/mcp-server

@proof-holdings/mcp-server

Official

regenerate_api_key

Destructive

Regenerate an API key: issues a new key (a new id and secret) with the same name, environment, scopes and sub-account. Pass expires_at to choose when the new key stops working — a date, or null for never; leave it out and the new key keeps…

Instructions

Regenerate an API key: issues a new key (a new id and secret) with the same name, environment, scopes and sub-account. Pass expires_at to choose when the new key stops working — a date, or null for never; leave it out and the new key keeps the old key's end date (or none). Ask the user rather than choosing. The answer's expires_at is when the new key stops working (carried from the old key when you send none); with no expires_at the new key never expires. A key whose expires_at has passed (see list_api_keys) is refused (api_key_expired) and a new date does not revive it, so check it before starting 2FA: for a key an MCP sign-in minted the message reads "This key stopped working on and can't be turned back on. Connect your AI client again to get a new one."; for any other key, "This key stopped working on and can't be turned back on. Create a new key." The old key stops working immediately; use the id in this response from now on. The new key lists the old one in replaced_key_ids, so its requests and usage stay with it. The new secret is returned ONLY in this response. Note: the secret will be visible in the AI conversation context.

Agent usage: This operation requires 2FA bound to this key and to the end date sent (none sent, a date, and null are three different confirmations). (1) Call regenerate_api_key with the end date the user chose, or none; its 2fa_required refusal lists the exact targets — [""] with no expires_at, ["", "act:expires_at:<the instant as UTC ISO 8601 with milliseconds>"] for a date, "act:expires_at:never" for null. (2) Call start_2fa with action_type "api_key_regenerate" and exactly those targets; the user is shown the new end date (or "never") they are approving. (3) Wait for the user to verify the code and poll get_2fa_status until "verified". (4) Call regenerate_api_key again with the SAME expires_at.

ACCESS: needs a Proof account, signed in: call start_login, show the user its challenge, then wait_for_login, then call this tool again. An API key alone does NOT open this tool.

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": {
      "id": "<id>"
    },
    "name": "regenerate_api_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesAPI key ID to regenerate
expires_atNoWhen the new key stops working, ISO 8601 with offset, at least 5 minutes ahead — or null for a key that never expires. Leave it out to keep the old key's end date.

Output Schema

NameRequiredDescriptionDefault
idYesMongoDB ObjectId
keyYesThe full API key. Returned only in this response; it cannot be read again.
nameYes
prefixYes
scopesYes
warningYes
created_atYes
expires_atNoWhen the key stops working. Present when the key has an expiry: the one asked for at creation; on a regenerated key the one asked for while regenerating, else the old key's instant, carried over. Absent on a key that never expires.
profile_idYesSub-account (PublicProfile) the key is bound to; null for unbound keys.
environmentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.12.0
    • addedInput schema / properties / expires_at
      Added value: +{
      +  "description": "When the new key stops working, ISO 8601 with offset, at least 5 minutes ahead — or null for a key that never expires. Leave it out to keep the old key's end date.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / expires_at
      Added value: +{
      +  "description": "When the key stops working. Present when the key has an expiry: the one asked for at creation; on a regenerated key the one asked for while regenerating, else the old key's instant, carried over. Absent on a key that never expires.",
      +  "type": "string"
      +}
  2. Changed2 schema fields changedv1.7.2
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "description": "A newly created or regenerated API key, with its full value — the one response that carries it.",
      +  "properties": {
      +    "created_at": {
      +      "type": "string"
      +    },
      +    "environment": {
      +      "type": "string"
      +    },
      +    "id": {
      +      "description": "MongoDB ObjectId",
      +      "type": "string"
      +    },
      +    "key": {
      +      "description": "The full API key. Returned only in this response; it cannot be read again.",
      +      "type": "string"
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "prefix": {
      +      "type": "string"
      +    },
      +    "profile_id": {
      +      "description": "Sub-account (PublicProfile) the key is bound to; null for unbound keys.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "scopes": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "warning": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "key",
      +    "name",
      +    "prefix",
      +    "environment",
      +    "scopes",
      +    "profile_id",
      +    "created_at",
      +    "warning"
      +  ],
      +  "type": "object"
      +}
  3. First observedv1.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, and the description goes well beyond them: the old key stops working immediately, the new secret appears only in this response and is exposed in the AI conversation context, the old key is linked via replaced_key_ids for usage continuity, and refusal codes such as api_key_expired are named with the exact messages to relay. It also documents the 2FA binding requirement and that 'none sent', a date, and null are three different confirmations — far more than the annotations carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and the ask-the-user rule are front-loaded, but the expires_at semantics are restated three times ('the new key keeps the old key's end date', 'The answer's expires_at is when the new key stops working (carried from the old key when you send none); with no expires_at the new key never expires'), which costs real space. The long error strings are defensible for verbatim relay, but the surrounding prose could be trimmed without losing any decision-relevant information.

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?

With an output schema present, return values need not be re-explained, yet the description still notes which response fields matter (the single-use secret, expires_at, replaced_key_ids). For a destructive, 2FA-gated, two-parameter operation it covers authorization prerequisites, expiry edge cases, failure modes and the multi-step recovery path — 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 coverage is 100%, so the baseline is 3; the description earns above that by explaining the operational meaning of the three expires_at states (inherited end date when omitted, never when null, explicit date otherwise) and by mapping each state to a distinct 2FA target list. It stops short of repeating the schema's ISO 8601/5-minute-ahead constraint, which is fine since the schema covers it.

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 ('Regenerate an API key: issues a new key') and immediately enumerates what is preserved — same name, environment, scopes and sub-account — which implicitly separates it from create_api_key (a fresh key) and set_api_key_expiry (date-only change). An agent knows exactly what this operation 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use behavior ('Ask the user rather than choosing' for expires_at), an explicit exclusion (a key whose expires_at has passed is refused and a new date does not revive it — check list_api_keys first), and a numbered prerequisite flow with start_2fa, get_2fa_status, start_login and wait_for_login. Both the alternative action and the sequencing are spelled out rather than inferred.

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