Skip to main content
Glama

Create Api Key

create_api_key
Read-only

Creates a new API key with optional expiration, spend limit, IP whitelist, and reset interval; returns the secret once for the user to store immediately. Requires an admin key.

Instructions

Create a new API key on the account. Its secret is returned ONCE, in this result: tell the user to store it now. Needs an ADMIN key. If key management is turned off on this server, nothing is created and the result gives the dashboard link instead.

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

Input Schema

NameRequiredDescriptionDefault
nameYesA name for the key
expires_atNoWhen the key stops working, YYYY-MM-DD. Optional
spend_limitNoSpend cap in USD for each reset window. Optional
ip_whitelistNoIP addresses or CIDR ranges allowed to use the key
reset_intervalNoHow often the spend counter resets. Optional

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.0

TDQS

B3.4/5.0
Behavior1/5

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

The description discloses genuinely useful behavior — the secret is returned exactly once and must be stored immediately, and the call degrades to a dashboard link when key management is disabled — but it describes a state-creating operation while the annotations declare readOnlyHint=true. Creating a key with a one-time secret is not a read, so the description and annotations are in direct conflict.

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?

Three short sentences, front-loaded with the action and its one-time-secret consequence, then prerequisites, then the fallback path. No wording is redundant and the most consequential fact (store the secret now) comes early.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a five-parameter creation tool with an output schema and full schema coverage, the description covers the essential non-schema facts: credential requirement, one-time secret exposure, and the disabled-feature fallback. The only residual risk is that an agent trusting the annotations could misclassify the operation as a safe read.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so name, expires_at, spend_limit, ip_whitelist, and reset_interval are already documented in the schema with types and formats. The description adds no additional meaning about any of the five parameters (e.g., spend_limit/reset_interval interaction), so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence names a specific verb and resource ('Create a new API key on the account'), which unambiguously separates it from the delete/get/update/list_api_key siblings. It stops short of explicitly routing the agent to or away from a named alternative, so it is clear but not differentiating by comparison.

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?

It states a real precondition ('Needs an ADMIN key') and a server-level condition that changes the outcome ('If key management is turned off... nothing is created'). That gives an agent clear use context, though it never states when to prefer this over update_api_key or another key tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.