Skip to main content
Glama

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. Optionally bind the key to a sub-account (project) via profile_id — outbound messages sent with the key are then branded as that project.

Agent usage: This operation requires 2FA. Before calling, complete the 2FA flow: (1) call start_2fa with action_type "api_key_create" and the user's preferred channel, (2) tell the user a code was sent and wait for them to verify, (3) poll get_2fa_status until status is "verified", (4) then call create_api_key — the backend session will be elevated. If you get a 403, the 2FA session has expired — restart the flow.

ACCESS: needs a Proof account. Authenticate this client (Claude Code: /mcp → Authenticate), or sign in with start_login — a session opens this tool — then call this tool again.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoHuman-readable key name
scopesNoPermission scopes for the key
profile_idNoBind the new key to a sub-account (PublicProfile) project you own (24-hex id). Immutable after creation; omit for an unbound account-wide key.
environmentNoKey environment (default: production)

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?

No annotations are provided, so the description carries the full burden—and it delivers. It discloses that the secret is shown only once, that it remains visible in the AI conversation context, that profile_id is immutable after creation, that 2FA must be completed first, and that a 403 means the 2FA session expired.

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?

The description is longer than average, but it is front-loaded with the core behavior and organized into clear sections for agent usage and access. Each sentence carries operational weight—security warnings, 2FA steps, and error recovery—so the length is justified by the tool's complexity.

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, security-sensitive creation tool with no output schema, the description covers all critical aspects: response behavior (secret only in this response), parameter nuances, 2FA prerequisite, authentication path, and failure handling. Nothing essential for correct invocation 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 schema already documents name, scopes, profile_id, and environment. The description adds meaning beyond the schema by explaining how profile_id affects behavior: outbound messages sent with the key are branded as that project. This extra semantic context justifies a score above the baseline.

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 description opens with a specific verb and resource: 'Create a new API key.' It adds distinguishing details—the secret is returned only once, and the key can be bound to a sub-account via profile_id—which separate it clearly from siblings like regenerate_api_key, revoke_api_key, and list_api_keys.

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 gives an explicit, numbered 2FA workflow and states the access prerequisite ('needs a Proof account', authenticate or start_login). It clearly explains when create_api_key can be called and how to recover from a 403. It does not explicitly contrast this tool with sibling API-key tools, but the usage path is unambiguous.

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.