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

@proof-holdings/mcp-server

Official

create_api_key

Create a new API key. The secret key value is returned ONLY in this response — store it securely. Note: the secret will be visible in the AI conversation context.

Instructions

Create a new API key. The secret key value is returned ONLY in this response — store it securely. Note: the secret will be visible in the AI conversation context. Optionally bind the key to a sub-account via profile_id — outbound messages sent with the key are then branded as that sub-account. Optionally give it an end date with expires_at (ISO 8601 with offset, at least 5 minutes ahead); leave it out and the key never expires. Ask the user when the key should stop working rather than choosing for them. A date in the past or less than 5 minutes ahead is refused (validation_error) and nothing is created.

Agent usage: This operation requires 2FA bound to the key it creates — its environment, scopes, sub-account and end date: a code confirmed for one key does not create another. (1) Call create_api_key with what the user chose; nothing is created, and its 2fa_required refusal lists the exact targets for that key. (2) Call start_2fa with action_type "api_key_create" and exactly those targets (none if the refusal lists none); the user is shown the key they are approving. (3) Wait for the user to verify the code and poll get_2fa_status until "verified". (4) Call create_api_key again with the SAME arguments. One code creates one key.

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

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "create_api_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoHuman-readable key name
scopesNoPermission scopes for the key
expires_atNoWhen the key stops working, ISO 8601 with offset (e.g. 2027-02-13T23:59:59+01:00), at least 5 minutes ahead. Omit for a key that never expires.
profile_idNoBind the new key to a sub-account you own (24-hex id). Immutable after creation; omit for an unbound account-wide key.
environmentNoKey environment (default: production)

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 key stops working, ISO 8601 with offset (e.g. 2027-02-13T23:59:59+01:00), at least 5 minutes ahead. Omit for a key that never expires.",
      +  "type": "string"
      +}
    • 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. Changed3 schema fields changedv1.7.2
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / profile_id / description
      Previous value: -"Bind the new key to a sub-account (PublicProfile) project you own (24-hex id). Immutable after creation; omit for an unbound account-wide key."New value: +"Bind the new key to a sub-account you own (24-hex id). Immutable after creation; omit for an unbound account-wide key."
    • 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.8/5.0
Behavior5/5

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

Far beyond what readOnlyHint=false / destructiveHint=false convey: it discloses that the secret is shown exactly once, that it will appear in the AI conversation context, that 2FA is bound to the specific key's targets and one code creates one key, that profile_id is immutable, and that a bad expires_at yields validation_error with nothing created. These are non-obvious behaviors an agent would otherwise discover only by failing.

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 critical one-time-secret warning, then constraining facts, then a numbered workflow — a sound structure for a mandatory multi-step tool. It repeats the "at least 5 minutes ahead" rule twice and restates the no-expiry case, which is mild bloat in an otherwise dense passage.

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 an agent needs to act correctly on a mutating, 2FA-gated, one-shot-secret tool: authentication prerequisites, the exact retry sequence, validation failure semantics, and immutability. An output schema exists, so the absence of return-value detail is not a gap.

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, but the description still adds meaning: profile_id determines outbound branding for that sub-account, expires_at omission means the key never expires, and sub-5-minute dates are refused. It adds nothing on scopes, name, or environment beyond the schema, which keeps it from a 5.

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 — "Create a new API key" — and immediately scopes the outcome by stating the secret is returned only once. An agent can distinguish this from list_api_keys, regenerate_api_key, and revoke_api_key without consulting 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 Guidelines5/5

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

Gives an explicit four-step procedure naming the sibling tools to call (create_api_key → start_2fa → get_2fa_status → create_api_key again), plus a separate login prerequisite chain (start_login, wait_for_login). It also states a decision rule absent from the schema: "Ask the user when the key should stop working rather than choosing for them."

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