Skip to main content
Glama

Create an API token

create_token

Creates an API token for a project or for the organization, with its permissions, its environments and its lifetime; it is returned only once. Not by an agent connected through OAuth: a person creates it in while.

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

Input Schema

NameRequiredDescriptionDefault
daysNoLifetime in days (30 by default, 0 without expiry).
nameNoWhat it is for ("GitLab CI").
scopeNoA project, or the organization.project
projectNoThe project.
permissionsNodeploy and read by default.
environmentsNoWhere it can act (production, previews, or names); without a list, everywhere.
organizationNoFor an organization token: its name; optional with an organization token.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover the mutation profile (readOnlyHint=false, idempotentHint=false, destructiveHint=false), and the description adds two facts they do not: the secret 'is returned only once' (so it cannot be re-read later and must be captured on the call) and the OAuth-caller exclusion. Both materially change how an agent should handle the result. It stops short of stating permission requirements or whether revoking is possible.

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?

Two sentences, front-loaded with the verb and resource, then the one-time-return caveat. No padding. The only cost is the trailing clause, which is grammatically broken and slightly obscures the restriction it is trying to convey.

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 non-idempotent creation tool with full annotation coverage and no output schema, the description supplies the two things an agent most needs: the response cannot be retrieved again, and some callers are barred. Remaining gap is scope-dependent required inputs, which neither the description nor the schema clarifies since zero parameters are marked required.

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 every one of the seven parameters is already documented in the schema, and the description merely echoes permissions/environments/lifetime at a high level. It does not resolve the ambiguity that all parameters are optional while project vs organization scope clearly requires different inputs. Baseline 3 applies when the schema carries the weight.

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?

States a specific verb and resource ('Creates an API token') plus the two scope variants (project or organization) and the fields the token carries (permissions, environments, lifetime). An agent can tell what is produced. No sibling in the catalog handles tokens, so no explicit differentiation is needed, which keeps this at a solid 4 rather than 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The second sentence attempts an exclusion: it cannot be called by an agent connected through OAuth and a person must create it in the UI instead. That is a real when-not condition, but the sentence is garbled ('creates it in while'), so the alternative is implied rather than stated cleanly. No positive when-to-use guidance distinguishes project vs organization tokens.

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