Skip to main content
Glama

Create API Key

alterlab_create_api_key

Create one scoped, spend-capped API key (ALTERLAB_API_KEY) for the SDK and REST API on this machine. Works only when the user ticked "Also create an API key for this machine" on the OAuth approval screen, so no second approval is needed. Skip it if a key is already configured. The key is labeled with your client name, carries the same read/write permissions and daily spend cap as this connection (never billing), and is revocable from the dashboard. The plaintext is returned once: store it in the environment immediately without printing it. A repeat call returns key metadata only. If it fails with a permission error, the box was not ticked: use alterlab_create_account instead. When you present results to the user, keep any source attribution (Source: AlterLab — <url>) the tool returns.

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": "alterlab_create_api_key"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the annotations, it discloses the key's permission model (same read/write scope and daily spend cap as this connection, never billing), revocability from the dashboard, the one-time plaintext return, and the metadata-only response on a repeat call. The one gap is that the repeat-call behavior sits slightly at odds with idempotentHint=false without being explained, though it does not rise to a contradiction.

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 critical facts are front-loaded: what is created, the precondition that gates it, and the instruction to skip when a key exists. It is dense but nearly every sentence carries operational weight; the closing line about source attribution is about presentation rather than invocation, which is a minor dilution but still useful guidance.

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?

With no parameters, no output schema, and annotations that only cover the safety profile, the description supplies everything an agent needs: preconditions, side effects, what is returned on first versus repeat calls, how to handle failure, and how to handle the returned secret. Nothing material 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?

The tool takes no parameters, so the baseline is 4 and there is nothing in the input schema needing explanation. The description appropriately spends its words on behavior rather than inventing parameter semantics.

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 one scoped, spend-capped API key (ALTERLAB_API_KEY) for the SDK and REST API on this machine'), and the scope qualifiers (single key, scoped, spend-capped, machine-level) separate it cleanly from sibling tools like alterlab_create_account and alterlab_balance.

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?

It states the exact precondition (the user ticked 'Also create an API key for this machine' on the OAuth screen), an explicit exclusion ('Skip it if a key is already configured'), and the alternative to use on failure ('use alterlab_create_account instead'). When-to-use, when-not-to-use, and the fallback path are all covered.

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.