Get Artifact Git Token
artifact-get_git_tokenGet git access to an EXISTING artifact, for local development with a real git client. Use this when you HAVE a working shell with git and outbound network access AND the job suits a local checkout — a large refactor, running or testing the project, branches, or history rewriting. For ordinary reading and editing of an artifact’s files, prefer artifact-explore and artifact-edit: they need no shell, no git and no network of your own, and they change the same repository. An artifact is a real git repository. Pass the sessionId — the id of an existing artifact (e.g. the last path segment of a .../chat/ URL, like "mr25vsjppVtbMx") — and this returns a gitRemoteUrl plus the authenticated principal’s commitAuthor. After cloning, apply the returned git config user.name and user.email instructions before committing; then edit files, commit, and git push — pushing updates the live artifact. The gitRemoteUrl holds a short-lived access token scoped to this one artifact (read-only or read-write, depending on your access). Tokens CANNOT be renewed: on a "token expired" git error, call this tool again for a fresh gitRemoteUrl and run git remote set-url origin <new gitRemoteUrl>, then retry. If a git command instead fails because the host cannot resolve or reach the server (DNS, proxy or firewall errors), do NOT retry it — that environment has no route to the git remote, so use artifact-edit instead. Treat the gitRemoteUrl as a secret. To rename an artifact or change its visibility, use artifact-update_metadata.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | The artifact session id — the last path segment of the artifact URL (e.g. "mr25vsjppVtbMx" from https://app.agentgrid.io/artifacts/mr25vsjppVtbMx), or the id from artifact-create. | |
| ttlSeconds | No | Optional token lifetime in seconds. Default and maximum 3600 (1 hour); minimum 300. Expired tokens cannot be renewed — mint a new one and update the git remote. |