Skip to main content
Glama

Get a code token

create_code_token

Makes a personal Git token for the workspace's kept code at CodeGene's own git address: the answer has the clone address, a username and password (what GitHub Importer at https://github.com/new/import asks for to copy the code with its history to the person's own GitHub), and ready git commands. With access read (the default) it clones and fetches; with access push it also pushes branches, but never the default branch, a branch a change going live holds, or a tag (going live moves the default branch). 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_code_tokens ends it, and so does leaving the workspace.

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

Input Schema

NameRequiredDescriptionDefault
daysNoHow many days the token lasts (1 to 365; 30 if left out).
accessNoread (the default) clones and fetches; push also pushes branches other than the default branch.
reasonYesWhy, in a sentence: kept in the workspace's activity.
workspace_idNoWorkspace id from whoami; omit when there is one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

The description goes far beyond the annotations by disclosing that the secret is shown once and only a fingerprint is stored, that it defaults to 30 days (1-365), that push scope still cannot push the default branch, release-holding branches, or tags, and that leaving the workspace or revoke_code_tokens ends it. Those are the exact behavioral traits an agent needs and none are available in the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose and the one-time-secret warning come first, which is good, but the content is crammed into one long run-on sentence with dense phrasing like 'a branch a change going live holds.' The length is justified by the safety-critical detail, yet some clauses could be split or trimmed for readability.

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?

There is no output schema, and the description compensates fully by spelling out what the response contains: clone address, username, password, and ready git commands. Combined with the expiration and revocation rules, an agent has everything needed to call this tool and relay the result correctly.

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, but the description adds real meaning beyond the schema: it clarifies that access=read is the default and that push is bounded by default-branch, release-branch, and tag restrictions. The reason parameter is still only implied by 'give it to the person,' not explained as an audit field, so it does not earn 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?

The description opens with a specific verb and resource: it 'makes a personal Git token for the workspace's kept code.' It also states what the token is for (cloning code with history into the user's own GitHub) and names the sibling 'revoke_code_tokens' as its counterpart, so an agent can tell it apart without opening any schema.

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?

It gives clear context for when this token is the right choice: copying code with its history via GitHub Importer or plain git clone/fetch, and it distinguishes read from push scope. It does not explicitly exclude alternatives such as create_api_key or export_code, but the use case is specific enough to route an agent correctly.

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