Skip to main content
Glama
MCP Git Server

MCP Git Server

by mpfilbin

git_add

Stages specified files or all repository changes for the next commit, letting assistants prepare Git commits without manual command-line steps.

Instructions

Add file contents to the staging area

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": {
      "files": "<files>"
    },
    "name": "git_add"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesYesFiles to stage (use ["."] to stage all files)
repoPathNoPath to git repository (defaults to current directory)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full burden. It does not say that this is a mutating operation, whether it is reversible, what happens if a path does not exist (git errors versus a silent no-op), or what it returns. This is a significant gap for an unannotated write tool.

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?

The description is a single efficient sentence with the key operation front-loaded. It does not waste words, but its brevity leaves little room for structure beyond the core statement.

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?

The tool is simple: two parameters, both documented in the schema, and no output schema. However, because it is a mutation tool with no annotations, the description should mention the side effects and failure modes of staging. It is minimally viable, but not complete.

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 both parameters, including the use of ["."] to stage all files. The description adds no detail beyond the schema, so the baseline score of 3 applies.

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 states a specific verb and resource: 'Add file contents to the staging area.' An agent can identify this as the git staging operation. However, it does not distinguish it from siblings such as git_restore that also manipulate the index, so the agent may not know which tool to use.

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

Usage Guidelines2/5

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

No guidance is given about when to use this tool versus alternatives, or about prerequisites such as files needing to exist. The staging purpose hints at a pre-commit step, but that is only inferred. For example, the description never mentions git_restore for unstaging, which an agent might need.

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