pare-git

v0.24.2
io.github.Dave-London/pare-git Checked 52 minutes ago Published 3 days ago

Pare 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).

ParameterTypeDescription
ignoreSubmodulesstringIgnore submodule changes (--ignore-submodules)
noLockIndexbooleanDo not take optional locks such as the index refresh lock (git --no-optional-locks status), for use alongside other git processes
noRenamesbooleanDisable rename detection (--no-renames)
pathstringRepository 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…
pathspecarrayFilter status to specific paths (-- <pathspec>)
porcelainVersionstringPorcelain output version (--porcelain=v1|v2)
renamesbooleanEnable rename detection (--renames). Set to false with noRenames.
showIgnoredbooleanShow ignored files (--ignored)
showStashbooleanInclude stash count (--show-stash)
untrackedFilesstringControl untracked file display mode (-u/--untracked-files)

log Git Log

Returns commit history as structured data.

ParameterTypeDescription
allbooleanShow all refs (--all)
authorstringFilter by author name or email
committerstringFilter by committer name or email (--committer)
compactbooleanPrefer compact output
dateFormatstringControl date format (--date), e.g. short, iso, relative, format:%Y-%m-%d
diffFilterstringFilter by change type (--diff-filter), e.g. A, M, D
filePathstringFilter commits affecting a specific file (-- <path>)
firstParentbooleanFollow only first parent (--first-parent)
followbooleanFollow file renames (--follow)
grepstringFilter by commit message pattern (--grep)
maxCountnumberNumber of commits to return (default: 10)
noMergesbooleanExclude merge commits (--no-merges)
pathstringRepository 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…
pickaxestringSearch for code changes (-S)
refstringBranch, tag, or commit to start from
sincestringFilter commits after this date (--since), e.g. '2024-01-01' or '2 weeks ago'
skipnumberSkip N commits for pagination (--skip)
untilstringFilter commits before this date (--until)

log-graph Git Log Graph

Returns visual branch topology as structured data. Wraps `git log --graph --oneline --decorate`.

ParameterTypeDescription
allbooleanShow all branches (--all)
authorstringFilter by author (--author)
branchesbooleanShow all branches (--branches)
compactbooleanPrefer compact output
filePathstringFilter to specific file (-- <path>)
firstParentbooleanSimplify graph to first parents only (--first-parent)
maxCountnumberNumber of commits to return (default: 20)
noMergesbooleanExclude merge commits (--no-merges)
pathstringRepository 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…
refstringBranch, tag, or commit to start from
remotesbooleanShow remote branches (--remotes)
simplifyByDecorationbooleanShow only decorated commits (--simplify-by-decoration)
sincestringFilter graph by date (--since)

diff Git Diff

Returns file-level diff statistics as structured data. Use full=true for patch content.

ParameterTypeDescription
algorithmstringSelect diff algorithm (--diff-algorithm)
atomicFullbooleanWhen full=true, use a single git invocation to fetch stats+patch together (reduced drift between calls)
compactbooleanPrefer compact output
contextLinesnumberNumber of context lines (-U<n>)
diffFilterstringFilter by change type (--diff-filter), e.g. A (added), M (modified), D (deleted), R (renamed)
filestringLimit diff to a specific file
filesarrayLimit diff to multiple file paths
findRenamesnumberRename detection threshold percentage (-M<n>), e.g. 50 for 50%
fullbooleanInclude full patch content in chunks
ignoreBlankLinesbooleanIgnore blank line changes (--ignore-blank-lines)
ignoreSpaceChangebooleanIgnore space amount changes (-b)
ignoreWhitespacebooleanIgnore all whitespace changes (-w)
nameStatusbooleanShow file status with name (--name-status)
pathstringRepository 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…
refstringCompare against a specific ref (branch, tag, commit)
relativebooleanShow relative paths (--relative)
reversebooleanReverse diff direction (-R)
stagedbooleanShow staged changes (--cached)
wordDiffbooleanWord-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).

ParameterTypeDescription
allbooleanInclude remote branches
compactbooleanPrefer compact output
containsstringFilter branches containing a commit (--contains)
createstringCreate a new branch with this name
deleteDelete branch(es) — pass a single name or an array of names
forcebooleanForce branch creation even if it exists (-f)
forceDeleteForce-delete unmerged branches (-D). Pass true (requires `delete` param), a branch name string, or an array of branch names.
mergedbooleanFilter to branches merged into HEAD (--merged)
mergedIntostringOpt-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.
noMergedbooleanFilter to branches not merged into HEAD (--no-merged)
pathstringRepository 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…
patternstringFilter branches matching a pattern (<pattern>)
remotesbooleanList remote branches only (-r)
renamestringNew name when renaming the current branch (-m/-M)
setUpstreamstringSet tracking branch (-u/--set-upstream-to)
sortstringSort branch list (--sort), e.g. -committerdate, authordate
startPointstringStart point for branch creation (commit, tag, or branch)
switchAfterCreatebooleanSwitch to the created branch after creation (uses git switch)
verbosebooleanVerbose 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`).

ParameterTypeDescription
compactbooleanPrefer compact output
dateFormatstringDate format (--date), e.g. short, iso, relative, format:%Y-%m-%d
diffFilterstringFilter diff output by change type (--diff-filter), e.g. A, M, D
filestringFile path to extract from the ref (e.g., 'src/index.ts'). Returns raw file content at that ref.
ignoreWhitespacebooleanFilter whitespace-only changes (-w)
nameStatusbooleanShow file status with name (--name-status)
notesbooleanInclude git notes (--notes)
patchbooleanInclude patch content in output (-p/--patch)
pathstringRepository 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…
refstringCommit hash, branch, or tag (default: HEAD)
showSignaturebooleanGPG 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).

ParameterTypeDescription
allbooleanStage all changes (git add -A)
chmodstringOverride file permission bits (--chmod=+x or --chmod=-x)
dryRunbooleanPreview staging without making changes (-n/--dry-run)
filesarrayFile paths to stage (required unless all is true)
forcebooleanAllow staging of ignored files (-f)
ignoreErrorsbooleanContinue staging past individual file failures (--ignore-errors)
ignoreRemovalbooleanAdd new and modified files but do not stage deletions (--ignore-removal)
intentToAddbooleanRecord intent to add files (-N/--intent-to-add)
pathstringRepository 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…
pathspecFromFilestringRead pathspec from file (--pathspec-from-file)
renormalizebooleanRe-apply clean filters to all tracked files (--renormalize)
resolvedbooleanStage matching unmerged paths only when no conflict markers remain (--resolved; Git 2.56+). Cannot combine with all or update.
updatebooleanStage 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).

ParameterTypeDescription
allbooleanAuto-stage tracked modified/deleted files (-a/--all)
allowEmptybooleanAllow commit with no changes (--allow-empty)
amendbooleanAmend the previous commit
authorstringOverride author (--author), e.g. 'Name <email>'
cleanupstringControl message whitespace handling (--cleanup), e.g. strip, whitespace, verbatim, scissors, default
datestringOverride author date (--date)
dryRunbooleanPreview commit without executing (--dry-run)
fixupstringCreate fixup commit for autosquash (--fixup=<commit>)
gpgSignbooleanGPG sign the commit (-S/--gpg-sign)
messagestringCommit message. Required unless noEdit, reuseMessage or fixup supplies the message; rejected together with them.
noEditbooleanKeep 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.
noVerifybooleanBypass pre-commit and commit-msg hooks (--no-verify)
pathstringRepository 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…
resetAuthorbooleanReset author info on amended commits (--reset-author)
reuseMessagestringReuse message from existing commit (-C <commit>)
signoffbooleanAdd Signed-off-by trailer (-s/--signoff)
trailerarrayTrailer 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.

ParameterTypeDescription
atomicbooleanAtomic push (--atomic)
branchstringBranch to push (default: current branch)
deletebooleanDelete remote branch/tag (--delete)
dryRunbooleanPreview push without executing (--dry-run)
followTagsbooleanPush annotated tags with commits (--follow-tags)
forcebooleanForce push (--force)
forceWithLeasebooleanSafe force push (--force-with-lease)
noVerifybooleanBypass pre-push hook (--no-verify)
pathstringRepository 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…
pushOptionarrayPush options (-o/--push-option), e.g. 'ci.skip'
refspecstringExplicit refspec (e.g. 'HEAD:refs/heads/branch')
remotestringRemote name (default: "origin")
setUpstreambooleanSet upstream tracking (-u)
tagsbooleanPush 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.

ParameterTypeDescription
autostashbooleanStash/unstash around pull (--autostash)
branchstringBranch to pull (default: current tracking branch)
depthnumberShallow fetch depth (--depth)
ffOnlybooleanOnly fast-forward pulls (--ff-only)
noCommitbooleanPull without auto-committing (--no-commit)
noVerifybooleanBypass pre-merge hooks (--no-verify)
pathstringRepository 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…
prunebooleanRemove stale remote-tracking refs before pulling (--prune)
rebasebooleanUse rebase instead of merge (--rebase)
rebaseModestringControl rebase behavior (--rebase=<mode>)
remotestringRemote name (default: "origin")
squashbooleanSquash pull (--squash)
strategystringMerge strategy (--strategy), e.g. recursive, ort
strategyOptionstringStrategy-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).

ParameterTypeDescription
branch *stringBranch name, tag, or commit SHA to checkout
createbooleanCreate a new branch (-b)
detachbooleanDetach HEAD at target (--detach)
forcebooleanForce checkout discarding local changes (-f)
forceCreatebooleanForce-create branch even if it exists (-B)
orphanstringCreate a new orphan branch with this name (--orphan)
pathstringRepository 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…
startPointstringStart point for new branch creation (commit, tag, or branch)
trackbooleanSet up tracking for remote branches (--track)
useSwitchbooleanUse 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.

ParameterTypeDescription
actionstringTag action to perform (default: list)
commitstringCommit to tag (used with create action, default: HEAD)
compactbooleanPrefer compact output
containsstringFilter tags containing a commit (--contains)
createstringShorthand to create a tag with this name (sets action=create). Consistent with branch tool's create parameter.
forcebooleanForce tag creation (-f)
mergedbooleanFilter to tags merged into HEAD (--merged)
messagestringTag message for annotated tags (used with create action, triggers -a -m)
namestringTag name (required for create and delete actions)
noMergedbooleanFilter to tags not merged into HEAD (--no-merged)
pathstringRepository 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…
patternstringFilter tags by pattern (e.g. 'v1.*')
pointsAtstringFilter tags pointing at a commit (--points-at)
signbooleanSign tag with GPG (-s)
sortBystringSort tag list (--sort), e.g. -creatordate, version:refname
verifybooleanVerify 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.

ParameterTypeDescription
compactbooleanPrefer compact output
dateFormatstringControl date format (--date), e.g. short, iso, relative
grepstringFilter stash entries by message (--grep)
includeSummarybooleanInclude file count and change summary per stash entry. Runs an additional git stash show per entry.
maxCountnumberLimit number of stash entries (-n/--max-count)
pathstringRepository 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…
sincestringFilter stash entries by date (--since)
statbooleanInclude 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.

ParameterTypeDescription
action *stringStash action to perform
allbooleanInclude ignored files (-a/--all)
branchNamestringBranch name used with action=branch (`git stash branch <name>`)
includeUntrackedbooleanStash untracked files (-u/--include-untracked)
indexnumberStash index for pop/apply/drop/show (e.g., 0 for stash@{0})
keepIndexbooleanKeep staged changes in index (--keep-index)
messagestringStash message (only used with push action)
patchbooleanInclude full diff patch in show output (-p/--patch)
pathstringRepository 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…
pathspecarrayStash specific files (-- <pathspec>)
reinstateIndexbooleanReinstate staged changes on apply (--index)
stagedbooleanStash 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.

ParameterTypeDescription
actionstringRemote action to perform (default: list)
compactbooleanPrefer compact output
namestringRemote name (required for add, remove, set-url, prune, show)
newNamestringNew remote name (required for rename action)
oldNamestringOld remote name (required for rename action)
pathstringRepository 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…
urlstringRemote 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.

ParameterTypeDescription
file *stringFile path to blame
compactbooleanPrefer compact output
detectCopiesbooleanDetect lines copied from other files (-C)
detectMovesbooleanDetect moved lines within a file (-M)
endLinenumberEnd line number for blame range
funcnamestringBlame by function name (-L :<funcname>)
ignoreRevarraySpecific commit(s) to ignore (--ignore-rev, repeated)
ignoreRevsFilestringPath to file listing revisions to ignore (--ignore-revs-file), e.g. .git-blame-ignore-revs
ignoreWhitespacebooleanIgnore whitespace changes (-w)
pathstringRepository 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…
revstringBlame from a specific commit/tag (<rev>)
reversebooleanFind when lines were removed (--reverse)
showStatsbooleanInclude work-amount statistics (--show-stats)
sincestringLimit blame history to a date range (--since)
startLinenumberStart 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.

ParameterTypeDescription
files *arrayFile paths to restore
conflictstringSet conflict style (--conflict)
ignoreUnmergedbooleanIgnore unmerged entries (--ignore-unmerged)
mergebooleanRecreate conflicted merge (--merge)
noOverlaybooleanRemove extra files (--no-overlay)
oursbooleanRestore ours version during conflicts (--ours)
pathstringRepository 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…
recurseSubmodulesbooleanRecurse into submodules (--recurse-submodules)
sourcestringRestore from specific ref (--source)
stagedbooleanRestore staged changes (--staged)
theirsbooleanRestore theirs version during conflicts (--theirs)
worktreebooleanRestore 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).

ParameterTypeDescription
confirmbooleanSafety confirmation required when mode is 'hard'. Must be set to true to proceed with --hard reset, which permanently discards uncommitted changes.
filesarrayFile paths to unstage (omit to unstage all)
intentToAddbooleanKeep paths in index as intent-to-add (-N)
modestringReset mode: soft (keep staged), mixed (default, unstage), hard (discard all), merge, keep
pathstringRepository 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…
recurseSubmodulesbooleanRecurse into submodules (--recurse-submodules)
refstringRef 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.

ParameterTypeDescription
abortbooleanAbort in-progress cherry-pick
allowEmptybooleanAllow empty commits (--allow-empty)
appendCherryPickLinebooleanAppend "(cherry picked from commit ...)" to message (-x)
commitsarrayCommit hashes to cherry-pick
continuebooleanContinue after resolving conflicts
keepRedundantCommitsbooleanKeep redundant/empty commits (--keep-redundant-commits)
mainlinenumberParent number for cherry-picking merge commits (-m/--mainline)
noCommitbooleanApply changes without committing (-n)
pathstringRepository 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…
quitbooleanQuit cherry-pick without reverting (--quit)
signoffbooleanAdd Signed-off-by trailer (-s/--signoff)
skipbooleanSkip current cherry-pick and continue (--skip)
strategystringMerge strategy (--strategy), e.g. recursive, ort
strategyOptionstringStrategy-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.

ParameterTypeDescription
branch *stringBranch to merge
abortbooleanAbort in-progress merge (--abort)
allowUnrelatedHistoriesbooleanAllow merging unrelated histories (--allow-unrelated-histories)
autostashbooleanStash/unstash around merge (--autostash)
continuebooleanContinue after conflict resolution (--continue)
ffOnlybooleanOnly fast-forward merges (--ff-only)
messagestringCustom merge commit message
noCommitbooleanMerge without auto-committing (--no-commit)
noFfbooleanForce merge commit (--no-ff)
noVerifybooleanBypass pre-merge hooks (--no-verify)
pathstringRepository 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…
quitbooleanQuit merge without reverting (--quit)
signoffbooleanAdd Signed-off-by trailer (--signoff)
squashbooleanSquash merge (--squash)
strategystringMerge strategy (--strategy), e.g. recursive, ort, resolve
strategyOptionstringStrategy-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.

ParameterTypeDescription
abortbooleanAbort in-progress rebase
autosquashbooleanAuto-apply fixup/squash commits (--autosquash)
autostashbooleanStash/unstash around rebase (--autostash)
branchstringTarget branch to rebase onto (required unless abort/continue/skip/quit)
continuebooleanContinue after conflict resolution
emptystringControl empty commit handling (--empty)
execstringRun command after each commit (--exec). Security: the executable is validated against the ALLOWED_COMMANDS policy when configured.
forceRebasebooleanForce rebase even if up-to-date (--force-rebase)
ontostringRebase onto a different base (--onto)
pathstringRepository 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…
quitbooleanQuit rebase without reverting (--quit)
rebaseMergesbooleanPreserve merge commits (--rebase-merges)
signoffbooleanAdd Signed-off-by trailer (--signoff)
skipbooleanSkip current commit during rebase (--skip)
strategystringMerge strategy (--strategy), e.g. recursive, ort
strategyOptionstringStrategy-specific option (-X), e.g. theirs, ours
updateRefsbooleanUpdate 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.

ParameterTypeDescription
actionstringReflog action: show (list entries) or exists (check if reflog exists)
allbooleanShow all refs' reflogs (--all)
compactbooleanPrefer compact output
grepReflogstringFilter reflog by message pattern (--grep-reflog)
maxCountnumberNumber of entries to return (default: 20)
pathstringRepository 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…
refstringWhich ref to show (default: HEAD)
reversebooleanShow entries in reverse order (--reverse)
sincestringFilter entries after this date (--since)
skipnumberSkip N entries for pagination (--skip)
untilstringFilter 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.

ParameterTypeDescription
action *stringBisect action to perform
badstringBad commit ref (used with start action)
commandstringScript/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…
firstParentbooleanFollow only first parent on merge commits (--first-parent)
goodGood commit ref(s) — single string or array of refs to narrow the search range (used with start action)
noCheckoutbooleanPerform bisection without checking out each commit (--no-checkout)
pathstringRepository 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…
pathsarrayRestrict bisection to changes affecting specific paths (-- <paths>)
replayFilestringPath to bisect log file used by replay action
termNewstringCustom term for the new/bad state (--term-new)
termOldstringCustom 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.

ParameterTypeDescription
actionstringWorktree action to perform (default: list). 'prune-merged' safely batch-removes worktrees whose HEAD is merged into `base`.
basestringBase 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).
branchstringBranch to checkout in the new worktree (used with add action)
compactbooleanPrefer compact output
createBranchbooleanCreate a new branch when adding a worktree (used with add action)
detachbooleanDetach HEAD on add (-d/--detach)
forcebooleanForce removal even if worktree is dirty (used with remove action)
forceAddbooleanAllow checking out already-checked-out branch on add (-f)
forceBranchbooleanCreate/reset branch on add (-B)
guessRemotebooleanAuto-detect remote tracking on add (--guess-remote)
listVerbosebooleanInclude 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).
mergedIntostringOn list: add `merged` per worktree (is its HEAD an ancestor of this ref). Useful alongside withStatus for safe cleanup triage.
newPathstringTarget path for worktree move (used with action=move)
noCheckoutbooleanSkip checkout on add (--no-checkout)
pathstringRepository 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…
reasonstringReason for locking the worktree (--reason, used with lock)
repairPathsarrayOptional worktree paths to repair (used with action=repair)
requireCleanbooleanFor action=prune-merged: only remove worktrees that are clean (no uncommitted changes). Default true. When false, dirty merged worktrees are force-removed.
withStatusbooleanOn list: enrich each worktree with { dirty, ahead, behind, unpushed }. Off by default to keep output lean.
worktreePathstringPath 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.

ParameterTypeDescription
actionstringSubmodule action to perform (default: list)
branchstringBranch to track (-b, used with add action)
forcebooleanForce operation (-f, used with deinit action)
initbooleanInitialize submodules (--init, used with update action)
pathstringRepository 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…
recursivebooleanRecurse into submodules (--recursive)
remotebooleanFetch from remote (--remote, used with update action)
submodulePathstringSubmodule path (optional for add, required for deinit)
urlstringRepository 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.

ParameterTypeDescription
output *stringOutput file path (required)
formatstringArchive format (default: inferred from output file, or tar)
pathstringRepository 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…
pathsarraySpecific paths to include in the archive
prefixstringPrepend prefix to each filename in the archive (--prefix)
treeishstringTree-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.

ParameterTypeDescription
directoriesbooleanAlso remove untracked directories (-d)
dryRunbooleanDry-run mode — list files without removing (default: true for safety)
excludearrayExclude patterns (-e)
forcebooleanForce removal (-f). Must be true and dryRun must be false to actually remove files.
ignoredbooleanAlso remove ignored files (-x)
onlyIgnoredbooleanOnly remove ignored files (-X)
pathstringRepository 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…
pathsarrayLimit 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.

ParameterTypeDescription
actionstringConfig action to perform (default: get)
keystringConfig key (required for get, set, unset)
pathstringRepository 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…
scopestringConfig scope (default: effective scope for get/list, local for set)
valuestringConfig value (required for set action)