Skip to main content
Glama
jesspig

git-mcp-server

by jesspig

git_add

Prepare modified or new files for a commit by staging them into the index. Use specific paths, all changes, or tracked updates for targeted staging.

Instructions

Stage files into the index, ready for committing. Use this to prepare modified or new files before a commit: select specific files, stage everything (all=True), or tracked changes only (update=True). Does NOT commit — use git_commit for that; review first with git_status and git_diff. Best for: preparing modified or new files before a commit. Returns: 'Staged files:' followed by the staged paths, or 'All changes staged'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allNoStage all changes
filesNoPaths to stage; must not start with '-'
updateNoStage modified and deleted files only
repo_pathNoPath to the git repository, defaults to '.' (the server working directory).
Behavior4/5

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

Annotations already indicate this is a mutating operation (readOnlyHint=false), and the description adds key behavioral context: it stages files but does not commit, and it describes return values. It could mention side effects like overwriting prior staging but that's arguably implied. No contradiction with annotations.

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 generally concise and front-loaded, but includes some redundancy: 'ready for committing' echoes 'prepare ... before a commit', and the 'Best for' line repeats the opening. Otherwise, every sentence provides useful info, and the return value is specified.

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 git tool with a simple schema and no output schema, the description is complete: it covers its role in the workflow, how to invoke it, alternatives, and expected return values. No significant gaps.

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 100%, so baseline is 3. The description adds meaningful parameter semantics by explaining 'stage everything (all=True)' and 'tracked changes only (update=True)', which goes beyond the schema's brief descriptions. It also implies the files parameter for specific selections.

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 specific verb and resource: 'Stage files into the index'. It also explicitly differentiates from git_commit ('Does NOT commit — use git_commit for that') and references git_status/git_diff for review, making its purpose unambiguous and distinct among siblings.

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?

Provides clear when-to-use guidance: 'prepare modified or new files before a commit'. It further explains the three usage modes (specific files, all=True, update=True) and explicitly states exclusions: 'Does NOT commit — use git_commit for that; review first with git_status and git_diff'. This is a model of usage orientation.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jesspig/git-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server