Skip to main content
Glama

git

Run version control commands with compact, token-cheap output. Read status, logs, diffs; write commits, branches, merges, pushes—ideal for AI-driven repository management.

Instructions

Run git with compact, token-cheap output. Read: status, log, diff, show, blame, branches, tags, remotes, stash_list, file_history, current, root, config_get. Write: add, unstage, commit, checkout, branch_create, branch_delete, merge, rebase, reset, revert, restore, stash, stash_pop, tag_create, fetch, pull, push, apply, clean, init. Anything else: action="raw" with args=["..."]. git runs directly, not through a shell, so commit messages with quotes and newlines need no escaping.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allNoadd: stage everything. commit: stage tracked changes first (-a). branches: include remotes.
cwdNoRepository directory. Default: server cwd.
keyNoconfig_get: the config key, e.g. user.email.
refNoBranch, tag, commit or range — depends on the action (show, diff, checkout, merge, reset, ...).
argsNoFor action="raw": the full git argv, e.g. ["bisect","start"]. For other actions: extra flags appended to the command.
hardNoreset: --hard (DISCARDS working tree changes) instead of --mixed.
statNodiff/show/log: summarise as changed files + line counts instead of full patch. Much cheaper.
amendNocommit: amend the previous commit.
forceNopush/branch_delete/clean: force the operation.
limitNolog/file_history: how many commits. Default 20.
patchNoapply: the unified diff text to apply.
pathsNoFiles/paths the action applies to (add, diff, checkout, restore, blame, file_history, ...).
actionYesWhat to do. Use "raw" with args for any git command not listed.
remoteNofetch/pull/push: remote name. Default origin.
stagedNodiff: show the staged changes (--cached).
messageNocommit/tag_create/stash: the message.
max_bytesNoByte cap on returned output.
timeout_msNoKill git after this long. Network actions default to 120000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does meaningful work: it discloses the token-cheap output preference, that git runs directly without a shell, and that quoting/newlines need no escaping — all non-obvious execution-model facts. It stops short of warning about destructive write actions (force push, reset --hard, clean) or auth needs for fetch/pull/push, so it is not exhaustive.

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 deliberately compressed: the main behavior and routing rule are front-loaded, action lists are comma-dense, and the closing escaping note is one clause. No sentence is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 18-parameter mutation-capable tool with no output schema and no annotations, the description covers action coverage and execution semantics well. It could do more on destructive-operation consequences and output shape, but the schema's explicit warnings (e.g. hard: 'DISCARDS working tree changes') fill part of that gap.

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 description coverage is 100%, so the schema already documents all 18 parameters including enum values and per-action flags; the baseline of 3 applies. The description reinforces the raw-action pattern and the no-escape rule for messages, but adds little parameter meaning the schema does not already provide.

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?

States a specific verb and resource ('Run git') with an explicit quality goal ('compact, token-cheap output'), then enumerates the read and write action families so the agent immediately knows the tool's surface. It is trivially distinguishable from shell_exec because it is git-specific.

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?

The description partitions the supported actions into Read and Write lists and gives a clear fallback ('Anything else: action="raw" with args'), which tells the agent exactly when to use which mode. It does not, however, say when to prefer this over the sibling shell_exec/shell_exec_async tools, which is the main remaining gap.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.