Skip to main content
Glama

Get Artifact Git Token

artifact-get_git_token
Read-only

Get 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

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesThe 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.
ttlSecondsNoOptional 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

The description adds substantial behavioral context beyond the readOnlyHint/destructiveHint annotations. It explains the returned gitRemoteUrl contains a short-lived token scoped to one artifact, that tokens cannot be renewed, how to recover from expiry, that pushing updates the live artifact, and to treat the URL as a secret. It also clarifies that the tool itself is read-only even though the returned credentials may allow writes, which is consistent with 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.

Conciseness5/5

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

The description is long but every sentence earns its place. It front-loads the purpose and when-to-use, then covers return values, usage steps, error handling, security, and alternative tools. There is no fluff; each clause adds necessary operational detail. The structure is logical and efficient for the complexity of the tool.

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 tool with no output schema, the description fully explains what is returned (gitRemoteUrl and commitAuthor), how to use it after cloning, and how to handle failures (token expiry vs. DNS errors). It also points to artifact-update_metadata for rename/visibility tasks, covering all relevant operational scenarios. An agent can invoke this tool correctly with no ambiguity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% for both parameters, so the schema already documents sessionId and ttlSeconds in detail. The description adds some context (e.g., the example URL format and the relationship between ttlSeconds and the renewal workflow), but that information is largely present in the schema itself (e.g., 'Expired tokens cannot be renewed — mint a new one and update the git remote'). Thus the description adds marginal value beyond the schema, warranting the baseline of 3.

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 clear verb-resource-purpose statement: 'Get git access to an EXISTING artifact, for local development with a real git client.' It also explicitly names sibling alternatives (artifact-explore, artifact-edit) and explains when each is preferred, so the agent can distinguish this tool from the rest of the list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit conditions for use: 'Use this when you HAVE a working shell with git and outbound network access AND the job suits a local checkout...' and lists concrete cases (large refactor, running/testing, branches, history rewriting). It also states when NOT to use it ('For ordinary reading and editing... prefer artifact-explore and artifact-edit') and how to handle DNS/proxy failures by falling back to artifact-edit. This is exemplary guidance.

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.