Skip to main content
Glama

Git Add

git_add

Stages specified files for commit in a Git repository, with options to target a repo path or use '.' to stage all changes.

Instructions

Stage file(s) for commit (git add).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "git_add"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesNoFile(s) to stage (space-separated, or '.' for all)..
repo_pathNoPath to the git repository..

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description bears the full behavioral burden and it says almost nothing beyond 'stage'. It does not disclose that the operation mutates the git index, whether it stages deletions or untracked files, whether it is reversible, or what permissions/repo state are required. The existence of an output schema excuses explaining return values, but not the mutation semantics.

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

Conciseness4/5

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

A single short sentence with the action front-loaded and zero filler, which is appropriate for a simple two-parameter tool. It is arguably under-specified rather than overly long, but nothing in it is wasted.

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

Completeness3/5

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

With only two optional parameters, a 100% documented schema, and an output schema, the tool is simple enough that the minimal description is nearly sufficient for correct invocation. The remaining gap is workflow context — how staging relates to git_commit — which matters given the many commit-adjacent siblings, plus the absence of any mutation disclosure.

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% and both parameters (files, repo_path) carry their own descriptions including the '.' default convention, so the schema does the heavy lifting. The parenthetical '(git add)' adds mild interpretive value but no detail on path/glob syntax or multi-file behavior beyond what the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource ('Stage file(s) for commit') and parenthetically maps it to the native 'git add', so its function is unambiguous. It does not, however, differentiate itself from siblings like git_commit, prepare_commit, or commit_changes, which occupy the adjacent workflow step.

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

Usage Guidelines3/5

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

Usage is only implied: 'for commit' hints that staging precedes committing, so an agent can infer the sequencing. There is no explicit statement of when to use this versus git_commit/commit_changes, and no note about prerequisites such as a prior base commit or clean working tree.

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