Skip to main content
Glama

Make an API key

create_api_key

Makes a key for CodeGene's public REST API, for the person's own scripts and integrations. It can do only what its scopes allow (projects:read (see the workspace's projects), tasks:read (see the workspace's tasks and where each one stands), reports:read (see the workspace's reports)), as the person who made it, in this workspace only; give it the fewest scopes the job needs. The answer has the key, the API's address and a curl example. It is shown once and CodeGene keeps only a fingerprint of it, so give it to the person straight away and never write it anywhere else. It lasts 30 days unless days says otherwise (1 to 365). revoke_api_key ends it, and so does the person leaving the workspace. Only owners and admins.

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

Input Schema

NameRequiredDescriptionDefault
daysNoHow many days the key lasts (1 to 365; 30 if left out).
nameYesWhat the key is for, such as Nightly export: how the person finds it in the list later.
reasonYesWhy, in a sentence: kept in the workspace's activity.
scopesYesWhat the key may do: one or more scopes.
workspace_idNoWorkspace id from whoami; omit when there is one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: it explains that the key acts as its creator with only its scopes, that it expires in 30 days by default, that revoke_api_key or the person leaving the workspace ends it, and that the secret is shown exactly once and kept only as a fingerprint. That last point is a real operational constraint an agent could otherwise violate.

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?

Front-loaded with purpose, then scopes, then the response and handling rules, then lifetime and access — a logical order with no filler sentences. It is dense in a single paragraph and repeats the days range already in the schema, so it is efficient but not flawless.

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 credential-issuing mutation tool with no output schema, the description covers what comes back ('the key, the API's address and a curl example'), how to handle the secret, lifetime, revocation paths, and permissions. An agent has everything needed to call it and to hand the result off safely.

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 100%, so the baseline is 3; the description still adds value by glossing each scope's real meaning and reinforcing the least-privilege choice among them. The days range and default are restated from the schema rather than adding new meaning, which keeps it from a 5.

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?

Opens with a specific verb and resource ('Makes a key for CodeGene's public REST API') and immediately narrows the audience and scope ('for the person's own scripts and integrations... in this workspace only'). It also names the sibling that terminates a key (revoke_api_key), so an agent can distinguish creation from revocation without opening schemas.

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?

Gives clear context for use (personal scripts and integrations), a least-privilege instruction ('give it the fewest scopes the job needs'), and an access prerequisite ('Only owners and admins'). It stops short of stating when not to issue a key or which sibling credential tool to prefer instead, so it falls just under the top bar.

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