Skip to main content
Glama

Create API key

create_api_key
Destructive

Create a Git API key with repository scopes and choose its type. type user (the default) reaches every project you can access, follows your live workspace role for pushes and must expire (1–366 days); use it for a coding agent working for you, such as Codex or Claude Code. type project reaches only the projects in projectIds (one or more you can manage) and may never expire; use it for CI or automation. Returns the secret once and structured Git host/username. Follow the local-development skill to store it through stdin and verify credential read-back; never print, commit, or repeat the secret. Site objects from list_sites include clone_url. Creating a user key beyond ten live keys revokes the least recently used one (unused keys first). Before cloning, pulling or pushing a site's code, call skills with name "local-development".

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": {
      "workspaceId": "<workspaceId>",
      "name": "<name>",
      "projectIds": "<projectIds>",
      "scopes": "<scopes>",
      "expiresInDays": "<expiresInDays>"
    },
    "name": "create_api_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
typeNoWhich access the key carries. user (default): every project you can access, following your live workspace role; pick it for a coding agent working on your behalf, such as Codex or Claude Code. project: only the projects in projectIds; pick it for CI or automation that should touch named projects and nothing else.user
scopesYesRepository scopes: repo.read to clone and pull, add repo.write to push.
projectIdsYesProjects a project key can reach; you must be able to manage each one. Required for type project. Null for type user, which reaches every project you can access.
workspaceIdYes
expiresInDaysYesDays until the key expires (1–366). User keys must expire; null makes a project key last until revoked.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / projectIds / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "format": "uuid",
      -      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      -      "type": "string"
      -    },
      -    "maxItems": 100,
      -    "minItems": 1,
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "format": "uuid",
      +      "type": "string"
      +    },
      +    "maxItems": 100,
      +    "minItems": 1,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / workspaceId / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  2. Changed9 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / expiresInDays
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 366,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Days until the key expires (1–366). User keys must expire; null makes a project key last until revoked."
      +}
    • removedInput schema / properties / projectId
      Removed value: -{
      -  "format": "uuid",
      -  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      -  "type": "string"
      -}
    • addedInput schema / properties / projectIds
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "format": "uuid",
      +        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +        "type": "string"
      +      },
      +      "maxItems": 100,
      +      "minItems": 1,
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Projects a project key can reach; you must be able to manage each one. Required for type project. Null for type user, which reaches every project you can access."
      +}
    • removedInput schema / properties / scopes / default
      Removed value: -[
      -  "repo.read"
      -]
    • addedInput schema / properties / scopes / description
      Added value: +"Repository scopes: repo.read to clone and pull, add repo.write to push."
    • addedInput schema / properties / type
      Added value: +{
      +  "default": "user",
      +  "description": "Which access the key carries. user (default): every project you can access, following your live workspace role; pick it for a coding agent working on your behalf, such as Codex or Claude Code. project: only the projects in projectIds; pick it for CI or automation that should touch named projects and nothing else.",
      +  "enum": [
      +    "user",
      +    "project"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "workspaceId",
      -  "projectId",
      -  "name"
      -]New value: +[
      +  "workspaceId",
      +  "name",
      +  "projectIds",
      +  "scopes",
      +  "expiresInDays"
      +]
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Far beyond the annotations: it discloses that the secret is returned only once, that user keys must expire in 1–366 days, that exceeding ten live user keys revokes the least recently used one (unused first), and that the agent must never print, commit or repeat the secret. The destructiveHint=true annotation is coherent with the documented LRU revocation. This is exactly the operational context the annotations cannot convey.

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 the verb and the two decision axes, then behavior, then safety. Dense but every sentence carries operational weight. There is mild duplication between the description and the enum/parameter descriptions for type, which slightly dilutes it.

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?

No output schema exists, yet the description states what comes back (secret once plus structured Git host/username) and mentions that site objects from list_sites carry clone_url. Side effects, expiry rules and the required skills prerequisite are all covered, so an agent has everything needed to call this 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 67%, and the description compensates by explaining the conditional relationships the schema only implies: projectIds is required for project keys, null for user keys; expiresInDays null means project keys last until revoked; scopes are repo.read to pull, add repo.write to push. Only the workspaceId and name parameters get no treatment, which is a minor omission.

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?

Specific verb+resource ('Create a Git API key') plus the two configuration axes (repository scopes, key type). An agent can immediately tell this apart from sibling create_* tools, which create sites, projects, files or artifacts, since it names the exact resource and its variant dimensions.

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?

Explicitly routes each mode: 'type user ... use it for a coding agent working for you, such as Codex or Claude Code' and 'type project ... use it for CI or automation.' It also states the prerequisite of calling skills with name "local-development" before cloning, pulling or pushing. It never names a sibling alternative for key creation, so it stops short of a full when/when-not map.

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