git-mcp-server: Stage paths
git_addStage 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
| Name | Required | Description | Default |
|---|---|---|---|
| paths | Yes | Explicit literal paths to stage; every path must satisfy the selected stage or merge session policy. | |
| stage_id | No | Optional existing normal-stage session ID. Omit for the first normal add; mutually exclusive with merge_session_id. | |
| repository | Yes | Absolute path to the exact target Git worktree for this mutation. | |
| request_id | Yes | Client-generated UUID that makes this mutation durable and idempotent for exact replay. | |
| expected_head | Yes | Exact current local HEAD object ID expected before mutation; mismatch rejects without Git mutation. | |
| expected_branch | Yes | Exact current local branch name expected before mutation; mismatch rejects without Git mutation. | |
| merge_session_id | No | Optional owned merge-session ID for conflict resolution. Omit for normal stage mode; mutually exclusive with stage_id. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| error | No | ||
| status | Yes | ||
| warnings | Yes | ||
| operation | Yes | ||
| request_id | No | ||
| repository_id | No | ||
| observed_after | No | ||
| observed_before | No |