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

@proof-holdings/mcp-server

Official

set_api_key_expiry

Destructive

Change when an API key stops working: set an end date on a key that has none, move it earlier or later, or pass expires_at null so the key never expires.

Instructions

Change when an API key stops working: set an end date on a key that has none, move it earlier or later, or pass expires_at null so the key never expires. The key keeps its id, secret, scopes and sub-account; only the date changes, and nothing extends it later. Answers the key as list_api_keys shows it.

Refused before any 2FA code is asked for: a key that is not one of the account's live keys (not_found); a key whose expires_at has passed (api_key_expired — it cannot be revived, create a new key instead); a key an MCP sign-in renews itself (api_key_managed_by_sign_in — list_api_keys shows managed_by_sign_in: true; the user disconnects the AI client to end it). Check list_api_keys first so you do not start 2FA for a refused change.

Agent usage: This operation requires 2FA bound to this key AND this exact value, shortening included: a code confirmed for one date does not set another date or "never". (1) Call set_api_key_expiry with the value the user chose; its 2fa_required refusal lists the exact targets — ["", "act:expires_at:<the instant as UTC ISO 8601 with milliseconds, e.g. 2027-02-09T14:59:59.999Z>"], or "act:expires_at:never" for null. (2) Call start_2fa with action_type "api_key_expiry" and exactly those targets; the user is shown the date (or "never") they are approving. (3) Wait for the user to verify the code and poll get_2fa_status until "verified". (4) Call set_api_key_expiry again with the SAME value. One code covers one change.

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>",
      "expires_at": "<expires_at>"
    },
    "name": "set_api_key_expiry"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesAPI key ID
expires_atYesThe new end date, ISO 8601 with offset, at least 5 minutes ahead — or null for a key that never expires. Ask the user rather than choosing.

Output Schema

NameRequiredDescriptionDefault
dataYesA live API key as the owner's key list shows it. Never carries the key value.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.12.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already flag this as a non-read-only, destructive mutation, and the description earns that flag by explaining the blast radius (only expires_at changes; nothing extends later) and the one-code-covers-one-change constraint. It also discloses the auth gate (Proof account plus start_login/wait_for_login) and the exact target strings a 2FA prompt will show. Minor gap: it never says what the refusal payload looks like for a successful vs. failed second call beyond the 2fa_required case.

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 purpose, then refusals, then a numbered procedure, then the auth requirement, so an agent can stop reading once it has what it needs. It is long, and the 'check list_api_keys first' advice is stated twice (in the refusal paragraph and again in step 1), which costs a little density but no clarity.

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?

Covers everything needed for a 2-parameter gated mutation: preconditions, failure modes, exact 2FA target format, retry semantics, and auth flow. Since an output schema exists, it only needs the one line pointing at list_api_keys for the return shape, which it gives.

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 goes further by requiring the expires_at instant to be expressed as UTC ISO 8601 with milliseconds in the 2FA target, which is stricter than the schema's 'ISO 8601 with offset'. It also states that the second call must repeat the SAME value, which is a semantic constraint the schema cannot express.

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?

Opens with a specific verb and resource plus the three supported operations (set a date, move it, null it out) and states what is untouched (id, secret, scopes, sub-account). It is clearly distinguishable from revoke_api_key and create_api_key by the 'only the date changes' framing and the 'cannot be revived' note.

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 lists the three refusal classes with named error codes and prerequisites, tells the agent to check list_api_keys first, and routes the expired-key case to an alternative ('create a new key instead'). The four-step 2FA procedure names the sibling tools to call and the order to call them in.

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