Skip to main content
Glama

Create API key

create_api_key

Create an API key and return its secret ONCE. A key can grant only scopes this key has. Optionally restrict it to specific websites. For the Chrome extension, create a key named 'Chrome extension' with scopes read + notify. Treat the secret as a credential: hand it only to what the user intends to use it.

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
nameYes
scopesYesread, notify, manage and/or admin.
websitesNoRestrict the key to these websites (ids or domains). Omit for all current and future websites.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, and the description goes beyond them by disclosing that the secret is shown only once, that a created key cannot exceed the creating key's scopes, and that the secret must be treated as a credential. It does not say whether key names must be unique or what happens on a duplicate name, which is the main residual behavioral gap.

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 short sentences, each carrying a distinct fact: creation and one-time secret, privilege ceiling, optional website restriction, and the extension recipe plus credential warning. The most decision-critical information (secret returned once) is front-loaded.

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 3-parameter mutation tool with a fully specified input schema and no output schema, the description covers the return value, the privilege model, the optional restriction, and safe handling. An agent has everything needed to call it correctly and to explain the result to a user.

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 67% (scopes and websites are documented, name is only constrained by min/max length), and the description compensates by explaining the privilege rule that a key can grant only scopes this key has and by giving a concrete name+scopes example. It does not enumerate the valid scope values (read/notify/manage/admin) or clarify that name is a free-form label.

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 opening sentence names a specific verb and resource ("Create an API key") plus a distinctive behavior ("return its secret ONCE"), so an agent immediately knows what the tool produces. It never explicitly contrasts with the sibling mutation tools (delete_api_key, revoke_api_key, rotate_api_key), so it falls just short of the top mark.

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 Chrome-extension recipe ("create a key named 'Chrome extension' with scopes read + notify") gives a concrete, actionable usage context that most definitions lack. It also explains the websites parameter's default behavior. It stops short of stating when NOT to use this tool or pointing to rotate_api_key instead when an existing key just needs new credentials.

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