Skip to main content
Glama

Moneda

create_api_key

Create an API key for a script, the CLI, or an integration. Returns the secret ONCE — it cannot be retrieved again, so hand it to the user immediately and tell them to store it somewhere safe. Maximum 10 active keys. The key can only carry scopes this connection already holds, and payment scopes are never available on an API key.

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

Input Schema

NameRequiredDescriptionDefault
nameYesWhat the key is for, e.g. 'monthly export script'
scopesYesPermissions for the key. Grant the narrowest set that does the job — it is a long-lived credential.
expiresInDaysNoOptional expiry, 1-365 days. Defaults to 90 days.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

The annotations only declare readOnlyHint=false and destructiveHint=false; the description goes well beyond that by warning that the secret is returned once and cannot be retrieved again, and by capping active keys at 10 and forbidding payment scopes. Those are genuinely useful behavioral facts that annotations don't carry. The remaining gap, the shape of the return value, is the only thing keeping it from a 4.

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?

Four sentences, each carrying a distinct and necessary fact: the purpose, the one-time secret return, the key cap, and the scope restriction. The most consequential warning about the secret is front-loaded, right after the purpose, and there is no filler or duplication.

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 credential-minting mutation with no output schema and full schema coverage, the description covers the critical operational facts: that the secret is shown once, that there's a 10-key ceiling, and that scopes are constrained. Only the exact response contents, such as whether a key identifier or prefix is returned alongside the secret, are left unspecified.

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 the schema already documents name, scopes, and expiresInDays, and the baseline would be 3. The description adds a real constraint on the scopes parameter, that it can only carry scopes this connection holds and never payment scopes, which is meaning the enum list alone doesn't convey. It says nothing extra about name or expiry, so it lands at a 3 overall.

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 definition opens with a specific verb and resource ("Create an API key") and names the three intended consumers (script, CLI, integration), which is more than a restatement of the tool name. It doesn't explicitly contrast itself with revoke_api_key or list_api_keys, but the purpose is unambiguous on its own.

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 gives clear context for when to reach for this tool (programmatic access via script, CLI, or integration) and states the hard limits that gate use: max 10 active keys, scopes bounded by the connection's own scopes. It stops short of naming alternatives or exclusions, so a 4 rather than a 5.

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.

Resources