pare-git
v0.24.2Pare Git ג€” Structured git operations (status, log, diff, branch, commit, push) as typed JSON.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
status Git Status
Returns the working tree status as structured data (branch, staged, modified, untracked, conflicts).
| Parameter | Type | Description |
|---|---|---|
ignoreSubmodules | string | Ignore submodule changes (--ignore-submodules) |
noLockIndex | boolean | Do not take optional locks such as the index refresh lock (git --no-optional-locks status), for use alongside other git processes |
noRenames | boolean | Disable rename detection (--no-renames) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
pathspec | array | Filter status to specific paths (-- <pathspec>) |
porcelainVersion | string | Porcelain output version (--porcelain=v1|v2) |
renames | boolean | Enable rename detection (--renames). Set to false with noRenames. |
showIgnored | boolean | Show ignored files (--ignored) |
showStash | boolean | Include stash count (--show-stash) |
untrackedFiles | string | Control untracked file display mode (-u/--untracked-files) |
log Git Log
Returns commit history as structured data.
| Parameter | Type | Description |
|---|---|---|
all | boolean | Show all refs (--all) |
author | string | Filter by author name or email |
committer | string | Filter by committer name or email (--committer) |
compact | boolean | Prefer compact output |
dateFormat | string | Control date format (--date), e.g. short, iso, relative, format:%Y-%m-%d |
diffFilter | string | Filter by change type (--diff-filter), e.g. A, M, D |
filePath | string | Filter commits affecting a specific file (-- <path>) |
firstParent | boolean | Follow only first parent (--first-parent) |
follow | boolean | Follow file renames (--follow) |
grep | string | Filter by commit message pattern (--grep) |
maxCount | number | Number of commits to return (default: 10) |
noMerges | boolean | Exclude merge commits (--no-merges) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
pickaxe | string | Search for code changes (-S) |
ref | string | Branch, tag, or commit to start from |
since | string | Filter commits after this date (--since), e.g. '2024-01-01' or '2 weeks ago' |
skip | number | Skip N commits for pagination (--skip) |
until | string | Filter commits before this date (--until) |
log-graph Git Log Graph
Returns visual branch topology as structured data. Wraps `git log --graph --oneline --decorate`.
| Parameter | Type | Description |
|---|---|---|
all | boolean | Show all branches (--all) |
author | string | Filter by author (--author) |
branches | boolean | Show all branches (--branches) |
compact | boolean | Prefer compact output |
filePath | string | Filter to specific file (-- <path>) |
firstParent | boolean | Simplify graph to first parents only (--first-parent) |
maxCount | number | Number of commits to return (default: 20) |
noMerges | boolean | Exclude merge commits (--no-merges) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
ref | string | Branch, tag, or commit to start from |
remotes | boolean | Show remote branches (--remotes) |
simplifyByDecoration | boolean | Show only decorated commits (--simplify-by-decoration) |
since | string | Filter graph by date (--since) |
diff Git Diff
Returns file-level diff statistics as structured data. Use full=true for patch content.
| Parameter | Type | Description |
|---|---|---|
algorithm | string | Select diff algorithm (--diff-algorithm) |
atomicFull | boolean | When full=true, use a single git invocation to fetch stats+patch together (reduced drift between calls) |
compact | boolean | Prefer compact output |
contextLines | number | Number of context lines (-U<n>) |
diffFilter | string | Filter by change type (--diff-filter), e.g. A (added), M (modified), D (deleted), R (renamed) |
file | string | Limit diff to a specific file |
files | array | Limit diff to multiple file paths |
findRenames | number | Rename detection threshold percentage (-M<n>), e.g. 50 for 50% |
full | boolean | Include full patch content in chunks |
ignoreBlankLines | boolean | Ignore blank line changes (--ignore-blank-lines) |
ignoreSpaceChange | boolean | Ignore space amount changes (-b) |
ignoreWhitespace | boolean | Ignore all whitespace changes (-w) |
nameStatus | boolean | Show file status with name (--name-status) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
ref | string | Compare against a specific ref (branch, tag, commit) |
relative | boolean | Show relative paths (--relative) |
reverse | boolean | Reverse diff direction (-R) |
staged | boolean | Show staged changes (--cached) |
wordDiff | boolean | Word-level diff (--word-diff) |
branch Git Branch
Lists, creates, renames, or deletes branches. List mode returns `{ branches, current }`. Mutations (create/delete/rename/setUpstream) return a compact confirmation `{ success, action, ... }` instead of the full listing — call again without a mutation param to list. When several mutations are combined in one call, the confirmation describes the last one performed. Pass `path` to target a specific repo or worktree — when omitted, operates on the server's own working directory, not the caller's (see #876).
| Parameter | Type | Description |
|---|---|---|
all | boolean | Include remote branches |
compact | boolean | Prefer compact output |
contains | string | Filter branches containing a commit (--contains) |
create | string | Create a new branch with this name |
delete | Delete branch(es) — pass a single name or an array of names | |
force | boolean | Force branch creation even if it exists (-f) |
forceDelete | Force-delete unmerged branches (-D). Pass true (requires `delete` param), a branch name string, or an array of branch names. | |
merged | boolean | Filter to branches merged into HEAD (--merged) |
mergedInto | string | Opt-in ancestry check: for each listed branch, add `merged` (fully contained in this ref) and `unmerged` (commit count not yet in the ref). Safe-delete predicate for cleanup workflows. |
noMerged | boolean | Filter to branches not merged into HEAD (--no-merged) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
pattern | string | Filter branches matching a pattern (<pattern>) |
remotes | boolean | List remote branches only (-r) |
rename | string | New name when renaming the current branch (-m/-M) |
setUpstream | string | Set tracking branch (-u/--set-upstream-to) |
sort | string | Sort branch list (--sort), e.g. -committerdate, authordate |
startPoint | string | Start point for branch creation (commit, tag, or branch) |
switchAfterCreate | boolean | Switch to the created branch after creation (uses git switch) |
verbose | boolean | Verbose branch listing (-v) |
show Git Show
Shows commit details and diff statistics for a given ref. When `file` is provided, extracts raw file content at that ref (e.g., `git show HEAD:src/index.ts`).
| Parameter | Type | Description |
|---|---|---|
compact | boolean | Prefer compact output |
dateFormat | string | Date format (--date), e.g. short, iso, relative, format:%Y-%m-%d |
diffFilter | string | Filter diff output by change type (--diff-filter), e.g. A, M, D |
file | string | File path to extract from the ref (e.g., 'src/index.ts'). Returns raw file content at that ref. |
ignoreWhitespace | boolean | Filter whitespace-only changes (-w) |
nameStatus | boolean | Show file status with name (--name-status) |
notes | boolean | Include git notes (--notes) |
patch | boolean | Include patch content in output (-p/--patch) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
ref | string | Commit hash, branch, or tag (default: HEAD) |
showSignature | boolean | GPG signature verification (--show-signature) |
add Git Add
Stages files for commit. Returns structured data with count and list of staged files, including how many were newly staged. Pass `path` to target a specific repo or worktree — when omitted, operates on the server's own working directory, not the caller's (see #876).
| Parameter | Type | Description |
|---|---|---|
all | boolean | Stage all changes (git add -A) |
chmod | string | Override file permission bits (--chmod=+x or --chmod=-x) |
dryRun | boolean | Preview staging without making changes (-n/--dry-run) |
files | array | File paths to stage (required unless all is true) |
force | boolean | Allow staging of ignored files (-f) |
ignoreErrors | boolean | Continue staging past individual file failures (--ignore-errors) |
ignoreRemoval | boolean | Add new and modified files but do not stage deletions (--ignore-removal) |
intentToAdd | boolean | Record intent to add files (-N/--intent-to-add) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
pathspecFromFile | string | Read pathspec from file (--pathspec-from-file) |
renormalize | boolean | Re-apply clean filters to all tracked files (--renormalize) |
resolved | boolean | Stage matching unmerged paths only when no conflict markers remain (--resolved; Git 2.56+). Cannot combine with all or update. |
update | boolean | Stage only modifications to tracked files, excluding untracked files (-u) |
commit Git Commit
Creates a commit with the given message (or, with noEdit/reuseMessage/fixup, the message git takes from there; message is then rejected). Returns structured data with hash, message, and change statistics. Pass `path` to target a specific repo or worktree — when omitted, operates on the server's own working directory, not the caller's (see #876).
| Parameter | Type | Description |
|---|---|---|
all | boolean | Auto-stage tracked modified/deleted files (-a/--all) |
allowEmpty | boolean | Allow commit with no changes (--allow-empty) |
amend | boolean | Amend the previous commit |
author | string | Override author (--author), e.g. 'Name <email>' |
cleanup | string | Control message whitespace handling (--cleanup), e.g. strip, whitespace, verbatim, scissors, default |
date | string | Override author date (--date) |
dryRun | boolean | Preview commit without executing (--dry-run) |
fixup | string | Create fixup commit for autosquash (--fixup=<commit>) |
gpgSign | boolean | GPG sign the commit (-S/--gpg-sign) |
message | string | Commit message. Required unless noEdit, reuseMessage or fixup supplies the message; rejected together with them. |
noEdit | boolean | Keep the existing message (--no-edit): with amend, the previous commit's message; otherwise a prepared message such as MERGE_MSG. Do not pass message with it. |
noVerify | boolean | Bypass pre-commit and commit-msg hooks (--no-verify) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
resetAuthor | boolean | Reset author info on amended commits (--reset-author) |
reuseMessage | string | Reuse message from existing commit (-C <commit>) |
signoff | boolean | Add Signed-off-by trailer (-s/--signoff) |
trailer | array | Trailer strings to append (--trailer), e.g. 'Signed-off-by: Name <email>' |
push Git Push
Pushes commits to a remote repository. Returns structured data with success status, remote, branch, summary, and whether the remote branch was newly created.
| Parameter | Type | Description |
|---|---|---|
atomic | boolean | Atomic push (--atomic) |
branch | string | Branch to push (default: current branch) |
delete | boolean | Delete remote branch/tag (--delete) |
dryRun | boolean | Preview push without executing (--dry-run) |
followTags | boolean | Push annotated tags with commits (--follow-tags) |
force | boolean | Force push (--force) |
forceWithLease | boolean | Safe force push (--force-with-lease) |
noVerify | boolean | Bypass pre-push hook (--no-verify) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
pushOption | array | Push options (-o/--push-option), e.g. 'ci.skip' |
refspec | string | Explicit refspec (e.g. 'HEAD:refs/heads/branch') |
remote | string | Remote name (default: "origin") |
setUpstream | boolean | Set upstream tracking (-u) |
tags | boolean | Push all tags (--tags) |
pull Git Pull
Pulls changes from a remote repository. Returns structured data with success status, summary, change statistics, conflicts, up-to-date and fast-forward indicators.
| Parameter | Type | Description |
|---|---|---|
autostash | boolean | Stash/unstash around pull (--autostash) |
branch | string | Branch to pull (default: current tracking branch) |
depth | number | Shallow fetch depth (--depth) |
ffOnly | boolean | Only fast-forward pulls (--ff-only) |
noCommit | boolean | Pull without auto-committing (--no-commit) |
noVerify | boolean | Bypass pre-merge hooks (--no-verify) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
prune | boolean | Remove stale remote-tracking refs before pulling (--prune) |
rebase | boolean | Use rebase instead of merge (--rebase) |
rebaseMode | string | Control rebase behavior (--rebase=<mode>) |
remote | string | Remote name (default: "origin") |
squash | boolean | Squash pull (--squash) |
strategy | string | Merge strategy (--strategy), e.g. recursive, ort |
strategyOption | string | Strategy-specific option (-X), e.g. theirs, ours |
checkout Git Checkout
Switches branches or restores files. Returns structured data with ref, previous ref, whether a new branch was created, and detached HEAD status. Pass `path` to target a specific repo or worktree — when omitted, operates on the server's own working directory, not the caller's, which can move branches in the wrong worktree (see #876).
| Parameter | Type | Description |
|---|---|---|
branch * | string | Branch name, tag, or commit SHA to checkout |
create | boolean | Create a new branch (-b) |
detach | boolean | Detach HEAD at target (--detach) |
force | boolean | Force checkout discarding local changes (-f) |
forceCreate | boolean | Force-create branch even if it exists (-B) |
orphan | string | Create a new orphan branch with this name (--orphan) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
startPoint | string | Start point for new branch creation (commit, tag, or branch) |
track | boolean | Set up tracking for remote branches (--track) |
useSwitch | boolean | Use git switch for branch operations when possible |
tag Git Tag
Manages git tags. Supports list (default), create, and delete actions. List returns structured tag data with name, date, and message. Create supports lightweight and annotated tags.
| Parameter | Type | Description |
|---|---|---|
action | string | Tag action to perform (default: list) |
commit | string | Commit to tag (used with create action, default: HEAD) |
compact | boolean | Prefer compact output |
contains | string | Filter tags containing a commit (--contains) |
create | string | Shorthand to create a tag with this name (sets action=create). Consistent with branch tool's create parameter. |
force | boolean | Force tag creation (-f) |
merged | boolean | Filter to tags merged into HEAD (--merged) |
message | string | Tag message for annotated tags (used with create action, triggers -a -m) |
name | string | Tag name (required for create and delete actions) |
noMerged | boolean | Filter to tags not merged into HEAD (--no-merged) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
pattern | string | Filter tags by pattern (e.g. 'v1.*') |
pointsAt | string | Filter tags pointing at a commit (--points-at) |
sign | boolean | Sign tag with GPG (-s) |
sortBy | string | Sort tag list (--sort), e.g. -creatordate, version:refname |
verify | boolean | Verify tag signature (-v) |
stash-list Git Stash List
Lists all stash entries with index, message, date, branch, and optional file change summary. Returns structured stash data.
| Parameter | Type | Description |
|---|---|---|
compact | boolean | Prefer compact output |
dateFormat | string | Control date format (--date), e.g. short, iso, relative |
grep | string | Filter stash entries by message (--grep) |
includeSummary | boolean | Include file count and change summary per stash entry. Runs an additional git stash show per entry. |
maxCount | number | Limit number of stash entries (-n/--max-count) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
since | string | Filter stash entries by date (--since) |
stat | boolean | Include diffstat per stash (--stat) |
stash Git Stash
Pushes, pops, applies, drops, shows, or clears stash entries. Returns structured result with action, success, message, and stash reference.
| Parameter | Type | Description |
|---|---|---|
action * | string | Stash action to perform |
all | boolean | Include ignored files (-a/--all) |
branchName | string | Branch name used with action=branch (`git stash branch <name>`) |
includeUntracked | boolean | Stash untracked files (-u/--include-untracked) |
index | number | Stash index for pop/apply/drop/show (e.g., 0 for stash@{0}) |
keepIndex | boolean | Keep staged changes in index (--keep-index) |
message | string | Stash message (only used with push action) |
patch | boolean | Include full diff patch in show output (-p/--patch) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
pathspec | array | Stash specific files (-- <pathspec>) |
reinstateIndex | boolean | Reinstate staged changes on apply (--index) |
staged | boolean | Stash only staged changes (--staged) |
remote Git Remote
Manages remote repositories. Supports list (default), add, remove, rename, set-url, prune, and show actions. Returns structured remote data.
| Parameter | Type | Description |
|---|---|---|
action | string | Remote action to perform (default: list) |
compact | boolean | Prefer compact output |
name | string | Remote name (required for add, remove, set-url, prune, show) |
newName | string | New remote name (required for rename action) |
oldName | string | Old remote name (required for rename action) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
url | string | Remote URL (required for add and set-url actions) |
blame Git Blame
Shows commit annotations for a file, grouped by commit. Returns structured blame data with deduplicated commit metadata (hash, author, email, date) and their attributed lines.
| Parameter | Type | Description |
|---|---|---|
file * | string | File path to blame |
compact | boolean | Prefer compact output |
detectCopies | boolean | Detect lines copied from other files (-C) |
detectMoves | boolean | Detect moved lines within a file (-M) |
endLine | number | End line number for blame range |
funcname | string | Blame by function name (-L :<funcname>) |
ignoreRev | array | Specific commit(s) to ignore (--ignore-rev, repeated) |
ignoreRevsFile | string | Path to file listing revisions to ignore (--ignore-revs-file), e.g. .git-blame-ignore-revs |
ignoreWhitespace | boolean | Ignore whitespace changes (-w) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
rev | string | Blame from a specific commit/tag (<rev>) |
reverse | boolean | Find when lines were removed (--reverse) |
showStats | boolean | Include work-amount statistics (--show-stats) |
since | string | Limit blame history to a date range (--since) |
startLine | number | Start line number for blame range |
restore Git Restore
Discards working tree changes or restores files from a specific commit. Returns structured data with restored files, source ref, and staged flag.
| Parameter | Type | Description |
|---|---|---|
files * | array | File paths to restore |
conflict | string | Set conflict style (--conflict) |
ignoreUnmerged | boolean | Ignore unmerged entries (--ignore-unmerged) |
merge | boolean | Recreate conflicted merge (--merge) |
noOverlay | boolean | Remove extra files (--no-overlay) |
ours | boolean | Restore ours version during conflicts (--ours) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
recurseSubmodules | boolean | Recurse into submodules (--recurse-submodules) |
source | string | Restore from specific ref (--source) |
staged | boolean | Restore staged changes (--staged) |
theirs | boolean | Restore theirs version during conflicts (--theirs) |
worktree | boolean | Restore working tree files (--worktree) |
reset Git Reset
Resets the current HEAD to a specified state. Supports soft, mixed, hard, merge, and keep modes. The 'hard' mode requires confirm=true as a safety guard since it permanently discards changes. Returns structured data with the ref, mode, and list of affected files. Pass `path` to target a specific repo or worktree — when omitted, operates on the server's own working directory, not the caller's (see #876).
| Parameter | Type | Description |
|---|---|---|
confirm | boolean | Safety confirmation required when mode is 'hard'. Must be set to true to proceed with --hard reset, which permanently discards uncommitted changes. |
files | array | File paths to unstage (omit to unstage all) |
intentToAdd | boolean | Keep paths in index as intent-to-add (-N) |
mode | string | Reset mode: soft (keep staged), mixed (default, unstage), hard (discard all), merge, keep |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
recurseSubmodules | boolean | Recurse into submodules (--recurse-submodules) |
ref | string | Ref to reset to (default: HEAD) |
cherry-pick Git Cherry-Pick
Applies specific commits to the current branch. Returns structured data with applied commits, any conflicts, and new commit hash.
| Parameter | Type | Description |
|---|---|---|
abort | boolean | Abort in-progress cherry-pick |
allowEmpty | boolean | Allow empty commits (--allow-empty) |
appendCherryPickLine | boolean | Append "(cherry picked from commit ...)" to message (-x) |
commits | array | Commit hashes to cherry-pick |
continue | boolean | Continue after resolving conflicts |
keepRedundantCommits | boolean | Keep redundant/empty commits (--keep-redundant-commits) |
mainline | number | Parent number for cherry-picking merge commits (-m/--mainline) |
noCommit | boolean | Apply changes without committing (-n) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
quit | boolean | Quit cherry-pick without reverting (--quit) |
signoff | boolean | Add Signed-off-by trailer (-s/--signoff) |
skip | boolean | Skip current cherry-pick and continue (--skip) |
strategy | string | Merge strategy (--strategy), e.g. recursive, ort |
strategyOption | string | Strategy-specific option (-X/--strategy-option), e.g. theirs, ours |
merge Git Merge
Merges a branch into the current branch. Supports abort, continue, and quit actions. Returns structured data with merge status, fast-forward detection, conflicts, and commit hash.
| Parameter | Type | Description |
|---|---|---|
branch * | string | Branch to merge |
abort | boolean | Abort in-progress merge (--abort) |
allowUnrelatedHistories | boolean | Allow merging unrelated histories (--allow-unrelated-histories) |
autostash | boolean | Stash/unstash around merge (--autostash) |
continue | boolean | Continue after conflict resolution (--continue) |
ffOnly | boolean | Only fast-forward merges (--ff-only) |
message | string | Custom merge commit message |
noCommit | boolean | Merge without auto-committing (--no-commit) |
noFf | boolean | Force merge commit (--no-ff) |
noVerify | boolean | Bypass pre-merge hooks (--no-verify) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
quit | boolean | Quit merge without reverting (--quit) |
signoff | boolean | Add Signed-off-by trailer (--signoff) |
squash | boolean | Squash merge (--squash) |
strategy | string | Merge strategy (--strategy), e.g. recursive, ort, resolve |
strategyOption | string | Strategy-specific option (-X), e.g. theirs, ours, patience |
rebase Git Rebase
Rebases the current branch onto a target branch. Supports abort, continue, skip, and quit for conflict resolution. Returns structured data with success status, branch info, conflicts, and rebased commit count.
| Parameter | Type | Description |
|---|---|---|
abort | boolean | Abort in-progress rebase |
autosquash | boolean | Auto-apply fixup/squash commits (--autosquash) |
autostash | boolean | Stash/unstash around rebase (--autostash) |
branch | string | Target branch to rebase onto (required unless abort/continue/skip/quit) |
continue | boolean | Continue after conflict resolution |
empty | string | Control empty commit handling (--empty) |
exec | string | Run command after each commit (--exec). Security: the executable is validated against the ALLOWED_COMMANDS policy when configured. |
forceRebase | boolean | Force rebase even if up-to-date (--force-rebase) |
onto | string | Rebase onto a different base (--onto) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
quit | boolean | Quit rebase without reverting (--quit) |
rebaseMerges | boolean | Preserve merge commits (--rebase-merges) |
signoff | boolean | Add Signed-off-by trailer (--signoff) |
skip | boolean | Skip current commit during rebase (--skip) |
strategy | string | Merge strategy (--strategy), e.g. recursive, ort |
strategyOption | string | Strategy-specific option (-X), e.g. theirs, ours |
updateRefs | boolean | Update dependent branches (--update-refs) |
reflog Git Reflog
Returns reference log entries as structured data, useful for recovery operations. Also supports checking if a reflog exists.
| Parameter | Type | Description |
|---|---|---|
action | string | Reflog action: show (list entries) or exists (check if reflog exists) |
all | boolean | Show all refs' reflogs (--all) |
compact | boolean | Prefer compact output |
grepReflog | string | Filter reflog by message pattern (--grep-reflog) |
maxCount | number | Number of entries to return (default: 20) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
ref | string | Which ref to show (default: HEAD) |
reverse | boolean | Show entries in reverse order (--reverse) |
since | string | Filter entries after this date (--since) |
skip | number | Skip N entries for pagination (--skip) |
until | string | Filter entries before this date (--until) |
bisect Git Bisect
Binary search for the commit that introduced a bug. Returns structured data with action taken, current commit, remaining steps estimate, and result.
| Parameter | Type | Description |
|---|---|---|
action * | string | Bisect action to perform |
bad | string | Bad commit ref (used with start action) |
command | string | Script/command to run for automated bisection (used with run action). Must return exit code 0 for good, 1-124/126-127 for bad, 125 to skip. Security: the executable is validated against the ALLOWED_CO… |
firstParent | boolean | Follow only first parent on merge commits (--first-parent) |
good | Good commit ref(s) — single string or array of refs to narrow the search range (used with start action) | |
noCheckout | boolean | Perform bisection without checking out each commit (--no-checkout) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
paths | array | Restrict bisection to changes affecting specific paths (-- <paths>) |
replayFile | string | Path to bisect log file used by replay action |
termNew | string | Custom term for the new/bad state (--term-new) |
termOld | string | Custom term for the old/good state (--term-old) |
worktree Git Worktree
Lists, adds, removes, locks, unlocks, or prunes git worktrees for managing multiple working trees. Returns structured data with worktree paths, branches, and HEAD commits. On list, pass withStatus for per-worktree {dirty, ahead, behind, unpushed} and/or mergedInto for a per-worktree merged flag. Use action=prune-merged {base, requireClean} for safe batch cleanup.
| Parameter | Type | Description |
|---|---|---|
action | string | Worktree action to perform (default: list). 'prune-merged' safely batch-removes worktrees whose HEAD is merged into `base`. |
base | string | Base ref. With add+createBranch: the new branch's start point. With action=prune-merged: the ref a worktree must be merged into to be eligible for removal (required). |
branch | string | Branch to checkout in the new worktree (used with add action) |
compact | boolean | Prefer compact output |
createBranch | boolean | Create a new branch when adding a worktree (used with add action) |
detach | boolean | Detach HEAD on add (-d/--detach) |
force | boolean | Force removal even if worktree is dirty (used with remove action) |
forceAdd | boolean | Allow checking out already-checked-out branch on add (-f) |
forceBranch | boolean | Create/reset branch on add (-B) |
guessRemote | boolean | Auto-detect remote tracking on add (--guess-remote) |
listVerbose | boolean | Include locked/prunable details on list. Always surfaced via the porcelain parser; this flag is accepted for compatibility and never passes git's -v (which conflicts with --porcelain). |
mergedInto | string | On list: add `merged` per worktree (is its HEAD an ancestor of this ref). Useful alongside withStatus for safe cleanup triage. |
newPath | string | Target path for worktree move (used with action=move) |
noCheckout | boolean | Skip checkout on add (--no-checkout) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
reason | string | Reason for locking the worktree (--reason, used with lock) |
repairPaths | array | Optional worktree paths to repair (used with action=repair) |
requireClean | boolean | For action=prune-merged: only remove worktrees that are clean (no uncommitted changes). Default true. When false, dirty merged worktrees are force-removed. |
withStatus | boolean | On list: enrich each worktree with { dirty, ahead, behind, unpushed }. Off by default to keep output lean. |
worktreePath | string | Path for the new or existing worktree (required for add/remove/lock/unlock) |
submodule Git Submodule
Manages git submodules. Supports list (default), add, update, sync, and deinit actions. List returns structured submodule data with path, SHA, branch, and status.
| Parameter | Type | Description |
|---|---|---|
action | string | Submodule action to perform (default: list) |
branch | string | Branch to track (-b, used with add action) |
force | boolean | Force operation (-f, used with deinit action) |
init | boolean | Initialize submodules (--init, used with update action) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
recursive | boolean | Recurse into submodules (--recursive) |
remote | boolean | Fetch from remote (--remote, used with update action) |
submodulePath | string | Submodule path (optional for add, required for deinit) |
url | string | Repository URL (required for add action) |
archive Git Archive
Creates an archive of files from a git repository. Supports tar, tar.gz, and zip formats. Returns structured data with success status, format, output file, and treeish.
| Parameter | Type | Description |
|---|---|---|
output * | string | Output file path (required) |
format | string | Archive format (default: inferred from output file, or tar) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
paths | array | Specific paths to include in the archive |
prefix | string | Prepend prefix to each filename in the archive (--prefix) |
treeish | string | Tree-ish to archive (default: HEAD) |
clean Git Clean
Removes untracked files from the working tree. DEFAULTS TO DRY-RUN MODE for safety — shows what would be removed without actually deleting. Set force=true AND dryRun=false to actually remove files.
| Parameter | Type | Description |
|---|---|---|
directories | boolean | Also remove untracked directories (-d) |
dryRun | boolean | Dry-run mode — list files without removing (default: true for safety) |
exclude | array | Exclude patterns (-e) |
force | boolean | Force removal (-f). Must be true and dryRun must be false to actually remove files. |
ignored | boolean | Also remove ignored files (-x) |
onlyIgnored | boolean | Only remove ignored files (-X) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
paths | array | Limit to specific paths |
config Git Config
Manages git configuration values. Supports get, set, list, and unset actions. Operates at local, global, system, or worktree scope.
| Parameter | Type | Description |
|---|---|---|
action | string | Config action to perform (default: get) |
key | string | Config key (required for get, set, unset) |
path | string | Repository path. Authoritative — when omitted, the server uses its own process working directory (its launch dir, not the caller's cwd). Callers in a git worktree or other directory MUST pass this e… |
scope | string | Config scope (default: effective scope for get/list, local for set) |
value | string | Config value (required for set action) |