Skip to main content
Glama

git_add

Idempotent

Stages literal files or directories from the configured or specified repository, rejecting the entire selection if any path is restricted by project policy.

Instructions

Stage literal files/directories; reject the entire selection if restricted. Omit repo_path to use the configured repository. Results and operations are restricted according to project policy.

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
filesYes
repo_pathNoOptional repository root. Omit to use the server's fixed repository. An explicit path must identify that same repository.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2026.10.19

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare non-read-only, non-destructive, idempotent, closed-world behavior, so the bar is lower. The description still adds real context the annotations cannot express: the selection is applied atomically ("reject the entire selection if restricted") and results are subject to project policy. It stops short of saying what a policy rejection looks like or what changes on partial failure.

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?

Three short clauses, none redundant, with the core action front-loaded before the failure semantics and the repo_path default. It is dense without being cryptic and contains no filler.

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 no output schema, the description should say what the agent gets back on success (staged file list, confirmation, or nothing) — it does not. Annotations cover the safety profile and the schema covers repo_path, so most of the burden is met, but the return behavior and the meaning of "restricted" are gaps for an agent verifying the call.

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

Parameters4/5

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

Schema coverage is 50% — repo_path is documented in-schema, but `files` has only a title. The description compensates by asserting the paths are taken literally (no glob/pattern expansion), which materially changes how an agent should construct the array, and it reinforces the repo_path omission rule. Path base (repo-relative vs absolute) and directory recursion remain unspecified.

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?

States a specific verb and resource ("Stage literal files/directories") with a qualifier — "literal" — that distinguishes it from pattern-based staging. It does not name or contrast with any sibling (e.g. git_unstage, git_restore, git_reset), so the differentiation is implicit rather than explicit.

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?

The only usage guidance is the parameter-level rule "Omit repo_path to use the configured repository," which is really about one input. There is no statement of when to prefer this tool over git_commit, git_unstage, or git_restore, and no prerequisites/exclusions are given. Usage is inferable from the git vocabulary but not stated.

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