Get a code token
create_code_tokenMakes 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
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | How many days the token lasts (1 to 365; 30 if left out). | |
| access | No | read (the default) clones and fetches; push also pushes branches other than the default branch. | |
| reason | Yes | Why, in a sentence: kept in the workspace's activity. | |
| workspace_id | No | Workspace id from whoami; omit when there is one. |