Skip to main content
Glama
saitolume

git-mcp-server

by saitolume

git-mcp-server: Stage paths

git_add

Stage literal file paths in a Git repository, enabling normal commits or conflict resolution in owned merge sessions, with idempotent requests.

Instructions

Operation: Stage only declared literal paths in a normal stage session or owned merge session. Returns: request_id, repository_id, mode, stage_id or merge_session_id, opaque index_tree, staged paths, and unresolved paths. Defaults: omitting both IDs selects normal first-add mode; stage_id and merge_session_id are mutually exclusive. Excludes: ordinary directories, globs, pathspec magic, unrequested paths, and unowned merge paths.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsYesExplicit literal paths to stage; every path must satisfy the selected stage or merge session policy.
stage_idNoOptional existing normal-stage session ID. Omit for the first normal add; mutually exclusive with merge_session_id.
repositoryYesAbsolute path to the exact target Git worktree for this mutation.
request_idYesClient-generated UUID that makes this mutation durable and idempotent for exact replay.
expected_headYesExact current local HEAD object ID expected before mutation; mismatch rejects without Git mutation.
expected_branchYesExact current local branch name expected before mutation; mismatch rejects without Git mutation.
merge_session_idNoOptional owned merge-session ID for conflict resolution. Omit for normal stage mode; mutually exclusive with stage_id.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
errorNo
statusYes
warningsYes
operationYes
request_idNo
repository_idNo
observed_afterNo
observed_beforeNo
Behavior5/5

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

The description goes beyond annotations by detailing return values, preconditions (expected_branch/expected_head), and constraints on paths. No contradiction with annotations; readOnlyHint=false is consistent with a mutation operation.

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 a single dense paragraph with clear labeled sections (Operation, Returns, Defaults, Excludes). Every sentence adds value without redundancy.

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?

Given the complexity and the presence of an output schema, the description covers the main aspects: operation, modes, preconditions, and exclusions. Minor missing details like definition of 'owned merge session' could be inferred.

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 the description adds value by explaining the interaction between stage_id and merge_session_id, and the default behavior. This nuance is not present in the schema alone.

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 clearly states the verb 'Stage' and the resource 'literal paths' in two specific modes (normal and merge session). It also explicitly lists exclusions, distinguishing this tool from siblings like git_commit or git_merge.

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 explains the default mode when IDs are omitted and the mutual exclusivity of stage_id and merge_session_id. It also lists excluded path types. However, it does not explicitly compare with sibling tools or state when not to use this tool.

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/saitolume/git-mcp-server'

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