io.github.cyanheads/git-mcp-server
NPM · @CYANHEADS/GIT-MCP-SERVER · SCANNED AUG 4
Comprehensive Git MCP server enabling native git tools including clone, commit, worktree, & more.
Available components
How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. How we score →
Supply Chain Security88
- No malware found by supply-chain analysis.Pass
- No known CVEs affecting this package version or its production dependencies.Pass
- No install/post-install scripts declared.Pass
- 34 of 34 dependencies flagged as unhealthy (34 deprecated). View diagnostics → Partial
Provenance & Transparency45
- Source repository is publicly reachable at the declared URL. View diagnostics → Pass
- Provenance check failed: no build-provenance attestation is published. See how to fix → View diagnostics → Fail
- Clear OSI-approved license (Apache-2.0).Pass
- Actively maintained (last published 89 days ago).Pass
- Disclosure check failed: no security disclosure policy was found in the source repository. See how to fix → Fail
Schema Quality & AI Usability79
- 100% of prompts and resources have a non-trivial description (not blank, and not just the item's name).Pass
- AI-judged instruction clarity (excellent).Pass
- Context-footprint check failed: tool/resource definitions use about 4712 tokens (~162/item across 29 items; 28 tools + 1 resources), over budget; trim descriptions and params. See how to fix → Fail
- Usage-examples check failed: none of the tools include examples. See how to fix → Fail
Stability & Change Management30
- Stability observed for 9 of 30 days with no destabilising changes; credit accrues until the full window elapses.Partial
Tool Coverage100
- 100% of tools have a non-trivial description (not blank, and not just the tool's name).Pass
- 100% of tool parameters carry a description.Pass
- Structured output schemas are declared (100% of tools); any adoption earns full credit.Pass
Capabilities100
- Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.Pass
Add this component to your MCP client. Where a client-specific snippet is available, pick your client below and copy it straight into your config; otherwise use the connection detail shown.
npm · @cyanheads/git-mcp-server
claude mcp add cyanheads-git-mcp-server -- npx -y @cyanheads/git-mcp-server
codex mcp add cyanheads-git-mcp-server -- npx -y @cyanheads/git-mcp-server
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"cyanheads-git-mcp-server": {
"type": "local",
"command": [
"npx",
"-y",
"@cyanheads/git-mcp-server"
],
"enabled": true
}
}
} openclaw mcp add cyanheads-git-mcp-server --command npx --arg -y --arg @cyanheads/git-mcp-server
mcp_servers:
cyanheads-git-mcp-server:
command: "npx"
args: ["-y", "@cyanheads/git-mcp-server"] {
"mcpServers": {
"cyanheads-git-mcp-server": {
"command": "npx",
"args": [
"-y",
"@cyanheads/git-mcp-server"
]
}
}
} Every change we have recorded for this component, newest first. Security-relevant changes are always shown. ▲ marks a change for the better, ▼ a change for the worse; unmarked changes are neutral.
- 4 Aug 26 +1
No change was recorded against any check on this day. Stability & Change Management went from 27 to 30. That category is still filling its 30-day observation window: 8 days of observed history at the previous scan, 9 at this one. The score rises as the window fills, whether or not the server changes.
- 3 Aug 26 +47
- Provenance: unverified → fail ▼ security
- Known CVEs: unverified → pass ▲ security
- Install scripts: unverified → pass ▲ security
- MCP protocol: unverified → pass ▲ functional
- Stability: unverified → 0.27 ▲ functional
- Maintenance: unverified → pass ▲ functional
- Schema quality: unverified → 100 ▲ functional
- License: unverified → pass ▲ functional
- Tool coverage: unverified → 100 ▲ functional
- Dependency health: partial → 0.00 functional
- Licence: Apache-2.0 functional
- 2 Aug 26 −31
- Provenance: fail → unverified ▼ security
- Known CVEs: pass → unverified ▼ security
- Install scripts: pass → unverified ▼ security
- Malware scan: unverified → pass ▲ security
- Stability: Stability not yet verified: we do not have a sandbox capture of the MCP schema this version of the package serves yet. security
- License: pass → unverified ▼ functional
- Capabilities: pass → unverified ▼ functional
- Tool coverage: 100 → unverified ▼ functional
- Schema quality: 100 → unverified ▼ functional
- Maintenance: pass → unverified ▼ functional
- Dependency health: 0.80 → partial functional
- Licence: Apache-2.0 functional
- 31 Jul 26 −9
- We updated how we score, so this day's move reflects our rubric, not a change to the server See what changed → functional
- 30 Jul 26 −18
- Malware scan: pass → unverified ▼ security
- 28 Jul 26 +30
- Provenance: unverified → fail ▼ security
- Known CVEs: unverified → pass ▲ security
- Install scripts: unverified → pass ▲ security
- Maintenance: unverified → pass ▲ functional
- Dependency health: unverified → 0.80 ▲ functional
- License: unverified → pass ▲ functional
- Schema quality: unverified → excellent ▲ functional
- Licence: Apache-2.0 functional
- 27 Jul 26 51
First indexed and scored.
Diagnostic detail from the automated scan of this channel: what the scanner observed at each step, so you can see exactly where a check passed or failed. It is informational only and never changes the trust score.
Captured 4 Aug 2026 · Analysed npm/@cyanheads/[email protected]
Provenance none
Ecosystem: npm · Outcome: none
Dependencies 34 packages
34 packages in the resolved dependency tree · 34 deprecated · 15 stale.
The tools this component advertises to a client, with an estimated token cost for each. Expand a tool to see its parameters and schema. The per-tool counts are indicative and are not scored directly; the schema's total context footprint is one signal in Schema Quality & AI Usability.
git_add Git Add ~139
Stage files for commit. Add file contents to the staging area (index) to prepare for the next commit.
| Name | Type | Req | Description |
|---|---|---|---|
| all | boolean | — | Include all items (varies by operation). |
| force | boolean | — | Allow adding otherwise ignored files. |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| paths | array | — | Array of file or directory paths to stage (relative to repository root). Use ["."] to stage all changes. Can be omitted when all or update is true. |
| update | boolean | — | Stage only modified and deleted files (skip untracked files). |
| Name | Type | Req | Description |
|---|---|---|---|
| stagedFiles | array | yes | Files that were successfully staged. |
| status | object | yes | Repository status after staging files. |
| success | boolean | yes | Indicates if the operation was successful. |
| totalFiles | integer | yes | Total number of files staged. |
No examples provided.
git_blame Git Blame ~127
Show line-by-line authorship information for a file, displaying who last modified each line and when. For large files, use startLine/endLine to limit output.
| Name | Type | Req | Description |
|---|---|---|---|
| endLine | integer | — | End line number (1-indexed). |
| filePath | string | yes | Path to the file to blame (relative to repository root). |
| ignoreWhitespace | boolean | — | Ignore whitespace changes. |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| startLine | integer | — | Start line number (1-indexed). |
| Name | Type | Req | Description |
|---|---|---|---|
| filePath | string | yes | The file that was blamed. |
| lines | array | yes | Array of blame information for each line. |
| success | boolean | yes | Indicates if the operation was successful. |
| totalLines | integer | yes | Total number of lines in the output. |
No examples provided.
git_branch Git Branch ~246
Manage branches: list all branches, show current branch, create a new branch, delete a branch, or rename a branch.
| Name | Type | Req | Description |
|---|---|---|---|
| all | boolean | — | For list mode: show both local and remote branches. |
| branchName | string | — | Branch name for create/delete/rename operations. |
| force | boolean | — | Force the operation, bypassing safety checks. |
| limit | integer | — | For list mode: cap the number of branches returned (applied at the git command). Use on repos with many branches. |
| merged | — | — | For list mode: show only branches merged into HEAD (true) or specified commit (string). |
| mode | string | — | The branch operation to perform. |
| newBranchName | string | — | New branch name for rename operation. |
| noMerged | — | — | For list mode: show only branches not merged into HEAD (true) or specified commit (string). |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| remote | boolean | — | For list mode: show only remote branches. |
| startPoint | string | — | Starting point (commit/branch) for new branch creation. |
| Name | Type | Req | Description |
|---|---|---|---|
| branches | array | — | List of branches (for list mode). |
| currentBranch | string | — | Name of current branch. |
| message | string | — | Success message for create/delete/rename modes. |
| mode | string | yes | — |
| success | boolean | yes | Indicates if the operation was successful. |
No examples provided.
git_changelog_analyze Git Changelog Analyze ~235
Gather git history context (commits, tags) and structured review instructions to support LLM-driven changelog analysis. Changelog file should be read separately; this tool provides the supporting git data and analysis framework. Pass one or more review types to control what kind of analysis to perform.
| Name | Type | Req | Description |
|---|---|---|---|
| branch | string | — | Branch to analyze (defaults to current branch). |
| maxCommits | integer | — | Maximum recent commits to fetch for cross-referencing (1-1000). |
| maxTags | integer | — | Maximum recent tags to fetch for release context (1-1000). Applied at the git command so large tag catalogs do not bloat the response. |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| reviewTypes | array | yes | Types of changelog review to perform. At least one required. Options: security, features, storyline, gaps, breaking_changes, quality. |
| sinceTag | string | — | Only include git history since this tag (e.g., "v1.2.0"). Narrows the analysis window. |
| Name | Type | Req | Description |
|---|---|---|---|
| gitContext | object | yes | Git history context for changelog cross-referencing. |
| reviewInstructions | string | yes | Analysis instructions for each requested review type. Guides the LLM on what to look for in the changelog. |
| reviewTypes | array | yes | Review types that were requested. |
| success | boolean | yes | Indicates if the operation was successful. |
No examples provided.
git_checkout Git Checkout ~140
Switch branches or restore working tree files. Can checkout an existing branch, create a new branch, or restore specific files.
| Name | Type | Req | Description |
|---|---|---|---|
| createBranch | boolean | — | Create a new branch with the specified name. |
| force | boolean | — | Force the operation, bypassing safety checks. |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| paths | array | — | Specific file paths to checkout/restore (relative to repository root). |
| target | — | yes | Branch name, commit hash, or tag to checkout. |
| track | boolean | — | Set up tracking relationship with remote branch when creating new branch. |
| Name | Type | Req | Description |
|---|---|---|---|
| branchCreated | boolean | yes | True if a new branch was created. |
| filesModified | array | yes | Files that were modified during checkout. |
| success | boolean | yes | Indicates if the operation was successful. |
| target | string | yes | Checked out branch or commit. |
No examples provided.
git_cherry_pick Git Cherry-Pick ~171
Cherry-pick commits from other branches. Apply specific commits to the current branch without merging entire branches.
| Name | Type | Req | Description |
|---|---|---|---|
| abort | boolean | — | Abort cherry-pick operation. |
| commits | array | yes | Commit hashes to cherry-pick. |
| continueOperation | boolean | — | Continue cherry-pick after resolving conflicts. |
| mainline | integer | — | For merge commits, specify which parent to follow (1 for first parent, 2 for second, etc.). |
| noCommit | boolean | — | Don't create commit (stage changes only). |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| signoff | boolean | — | Add Signed-off-by line to the commit message. |
| strategy | string | — | Merge strategy to use for cherry-pick. |
| Name | Type | Req | Description |
|---|---|---|---|
| conflictedFiles | array | yes | Files with conflicts that need resolution. |
| conflicts | boolean | yes | Whether operation had conflicts. |
| message | string | — | Human-readable next-step guidance, especially for conflicts. |
| pickedCommits | array | yes | Commits that were successfully cherry-picked. |
| success | boolean | yes | Indicates if the operation was successful. |
No examples provided.
git_clean Git Clean ~115
Remove untracked files from the working directory. Requires force flag for safety. Use dry-run to preview files that would be removed.
| Name | Type | Req | Description |
|---|---|---|---|
| directories | boolean | — | Remove untracked directories in addition to files. |
| dryRun | boolean | — | Preview the operation without executing it. |
| force | boolean | — | Force the operation, bypassing safety checks. |
| ignored | boolean | — | Remove ignored files as well. |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| Name | Type | Req | Description |
|---|---|---|---|
| directoriesRemoved | array | yes | List of directories that were removed. |
| dryRun | boolean | yes | Whether this was a dry-run (preview only). |
| filesRemoved | array | yes | List of files that were removed. |
| success | boolean | yes | Indicates if the operation was successful. |
No examples provided.
git_clear_working_dir Git Clear Working Directory ~77
Clear the session working directory setting. This resets the context without restarting the server. Subsequent git operations will require an explicit path parameter unless git_set_working_dir is called again.
| Name | Type | Req | Description |
|---|---|---|---|
| confirm | string | yes | Explicit confirmation required to clear working directory. Accepted values: 'Y', 'y', 'Yes', or 'yes'. |
| Name | Type | Req | Description |
|---|---|---|---|
| message | string | yes | Confirmation message. |
| previousPath | string | — | The working directory that was cleared (if one was set). |
| success | boolean | yes | Indicates if the operation was successful. |
No examples provided.
git_clone Git Clone ~171
Clone a repository from a remote URL or local path. Accepts HTTP(S), SSH, git://, file://, and bare filesystem paths, with optional shallow cloning.
| Name | Type | Req | Description |
|---|---|---|---|
| bare | boolean | — | Create a bare repository (no working directory). |
| branch | string | — | Specific branch to clone (defaults to remote HEAD). |
| depth | integer | — | Create a shallow clone with history truncated to N commits. |
| mirror | boolean | — | Create a mirror clone (implies bare). |
| path | string | yes | Destination path where the repository should be cloned. |
| url | string | yes | Source to clone from: HTTP(S) URL, SSH URL (ssh://… or git@host:path), git:// URL, file:// URL, or a bare filesystem path (e.g. /tmp/repo.git). |
| Name | Type | Req | Description |
|---|---|---|---|
| branch | string | yes | The branch that was checked out. |
| commitHash | string | — | Current HEAD commit hash. |
| path | string | yes | Local path where repository was cloned. |
| remoteUrl | string | yes | The remote URL or path that was cloned. |
| success | boolean | yes | Indicates if the operation was successful. |
No examples provided.
git_commit Git Commit ~263
Create a new commit with staged changes in the repository. Records a snapshot of the staging area with a commit message. **Commit Message Format:** Pass commit messages as JSON string parameters. Multi-line messages are supported using standard JSON string escaping. **Examples:** - Single line: { "message": "feat: add user authentication" } - Multi-line: { "message": "feat: add user authentication\n\nImplemented OAuth2 flow with JWT tokens.\nAdded tests for login and logout." } Note: Do not use bash heredoc syntax. Literal escape sequences (\n, \t) in the message string are automatically normalized to their actual characters.
| Name | Type | Req | Description |
|---|---|---|---|
| allowEmpty | boolean | — | Allow creating a commit with no changes. |
| amend | boolean | — | Amend the previous commit instead of creating a new one. Use with caution. |
| author | object | — | Override commit author (defaults to git config). |
| filesToStage | array | — | File paths to stage before committing (atomic stage+commit operation). |
| message | string | yes | Commit message. |
| noVerify | boolean | — | Bypass pre-commit and commit-msg hooks. |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| Name | Type | Req | Description |
|---|---|---|---|
| author | string | yes | Author of the commit. |
| commitHash | string | yes | SHA-1 hash of the created commit. |
| committedFiles | array | yes | List of files that were committed. |
| deletions | integer | — | Number of line deletions. |
| filesChanged | integer | — | Number of files changed in this commit. |
| insertions | integer | — | Number of line insertions. |
| message | string | yes | The commit message. |
| signed | boolean | yes | Whether the commit was signed. False when GIT_SIGN_COMMITS=false or when signing was attempted and fell back to unsigned on failure. |
| signingWarning | string | — | Populated only when signing was requested but failed, and the commit was created unsigned as a fallback. |
| status | object | yes | Repository status after the commit. |
| success | boolean | yes | Indicates if the operation was successful. |
| timestamp | integer | yes | Unix timestamp when the commit was created. |
No examples provided.
git_diff Git Diff ~272
View differences between commits, branches, or working tree. Shows changes in unified diff format.
| Name | Type | Req | Description |
|---|---|---|---|
| autoExclude | boolean | — | Automatically exclude lock files and other generated files (e.g., package-lock.json, yarn.lock, bun.lock, poetry.lock, go.sum) from diff output to reduce context bloat. Set to false if you need to in… |
| contextLines | integer | — | Number of context lines to show around changes. |
| includeUntracked | boolean | — | Include untracked files in the diff. Useful for reviewing all upcoming changes. |
| nameOnly | boolean | — | Show only names of changed files, not the diff content. |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| paths | array | — | Limit diff to specific file paths (relative to repository root). |
| source | string | — | Source commit/branch to compare from. If target is specified but not source, compares target against working tree. |
| staged | boolean | — | Show diff of staged changes instead of unstaged. |
| stat | boolean | — | Show diffstat (summary of changes) instead of full diff content. |
| target | string | — | Target commit/branch to compare against. If not specified, shows unstaged changes in working tree. |
| Name | Type | Req | Description |
|---|---|---|---|
| deletions | integer | — | Total number of line deletions. |
| diff | string | yes | The diff output in unified diff format. |
| excludedFiles | array | — | Files that were automatically excluded from the diff (e.g., lock files). Call again with autoExclude=false to include them. |
| filesChanged | integer | yes | Number of files with differences. |
| insertions | integer | — | Total number of line insertions. |
| success | boolean | yes | Indicates if the operation was successful. |
No examples provided.
git_fetch Git Fetch ~110
Fetch updates from a remote repository. Downloads objects and refs without merging them.
| Name | Type | Req | Description |
|---|---|---|---|
| depth | integer | — | Create a shallow clone with history truncated to N commits. |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| prune | boolean | — | Prune remote-tracking references that no longer exist on remote. |
| remote | string | — | Remote name (default: origin). |
| tags | boolean | — | Fetch all tags from the remote. |
| Name | Type | Req | Description |
|---|---|---|---|
| fetchedRefs | array | yes | References that were fetched from the remote. |
| prunedRefs | array | yes | References that were pruned (deleted locally). |
| remote | string | yes | Remote name that was fetched from. |
| success | boolean | yes | Indicates if the operation was successful. |
No examples provided.
git_init Git Init ~87
Initialize a new Git repository at the specified path. Creates a .git directory and sets up the initial branch.
| Name | Type | Req | Description |
|---|---|---|---|
| bare | boolean | — | Create a bare repository (no working directory). |
| initialBranch | string | — | Name of the initial branch (default: main). |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| Name | Type | Req | Description |
|---|---|---|---|
| initialBranch | string | yes | Name of the initial branch. |
| isBare | boolean | yes | Whether this is a bare repository. |
| path | string | yes | Path where repository was initialized. |
| success | boolean | yes | Indicates if the operation was successful. |
No examples provided.
git_log Git Log ~270
View commit history with optional filtering by author, date range, file path, or commit message pattern.
| Name | Type | Req | Description |
|---|---|---|---|
| author | string | — | Filter commits by author name or email pattern. |
| branch | string | — | Show commits from a specific branch or ref (defaults to current branch). |
| filePath | string | — | Show commits that affected a specific file path. |
| grep | string | — | Filter commits by message pattern (regex supported). |
| maxCount | integer | — | Maximum number of items to return (1-1000). |
| oneline | boolean | — | Abbreviated output: return only hash, shortHash, and subject per commit. Significantly reduces response size. |
| patch | boolean | — | Include the full diff patch for each commit. |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| showSignature | boolean | — | Show GPG signature verification information for each commit. |
| since | string | — | Show commits more recent than a specific date (ISO 8601 format). |
| skip | integer | — | Number of items to skip for pagination. |
| stat | boolean | — | Include file change statistics for each commit. |
| until | string | — | Show commits older than a specific date (ISO 8601 format). |
| Name | Type | Req | Description |
|---|---|---|---|
| commits | array | yes | Array of commit objects. |
| note | string | — | Set when filters returned zero commits. Echoes the criteria and suggests broadening so callers can self-correct without inspecting the request. |
| success | boolean | yes | Indicates if the operation was successful. |
| totalCount | integer | yes | Total number of commits returned (may be limited by maxCount). |
No examples provided.
git_merge Git Merge ~148
Merge branches together. Integrates changes from another branch into the current branch with optional merge strategies.
| Name | Type | Req | Description |
|---|---|---|---|
| abort | boolean | — | Abort an in-progress merge that has conflicts. |
| branch | string | yes | Branch to merge into current branch. |
| message | string | — | Custom merge commit message. |
| noFastForward | boolean | — | Prevent fast-forward merge (create merge commit). |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| squash | boolean | — | Squash all commits from the branch into a single commit. |
| strategy | string | — | Merge strategy to use (ort, recursive, octopus, ours, subtree). |
| Name | Type | Req | Description |
|---|---|---|---|
| conflictedFiles | array | yes | Files with conflicts that need resolution. |
| conflicts | boolean | yes | Whether merge had conflicts. |
| fastForward | boolean | yes | Whether merge was fast-forward. |
| mergedFiles | array | yes | Files that were merged. |
| message | string | yes | Merge commit message. |
| strategy | string | yes | Merge strategy used. |
| success | boolean | yes | Indicates if the operation was successful. |
No examples provided.
git_pull Git Pull ~112
Pull changes from a remote repository. Fetches and integrates changes into the current branch.
| Name | Type | Req | Description |
|---|---|---|---|
| branch | string | — | Branch name (default: current branch). |
| fastForwardOnly | boolean | — | Fail if can't fast-forward (no merge commit). |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| rebase | boolean | — | Use rebase instead of merge when integrating changes. |
| remote | string | — | Remote name (default: origin). |
| Name | Type | Req | Description |
|---|---|---|---|
| branch | string | yes | Branch that was pulled. |
| conflictedFiles | array | yes | Files with conflicts that need resolution (empty if conflicts is false). |
| conflicts | boolean | yes | Whether pull had conflicts. |
| filesChanged | array | yes | Files that were changed. |
| remote | string | yes | Remote name that was pulled from. |
| strategy | string | yes | Integration strategy used. |
| success | boolean | yes | Indicates if the operation was successful. |
No examples provided.
git_push Git Push ~216
Push changes to a remote repository. Uploads local commits to the remote branch.
| Name | Type | Req | Description |
|---|---|---|---|
| branch | string | — | Branch name (default: current branch). |
| confirmed | boolean | — | Explicit confirmation required for force push or branch deletion on protected branches (main, master, production, etc.). |
| delete | boolean | — | Delete the specified remote branch. |
| dryRun | boolean | — | Preview the operation without executing it. |
| force | boolean | — | Force push (overwrites remote history). |
| forceWithLease | boolean | — | Safer force push - only succeeds if remote branch is at expected state. |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| remote | string | — | Remote name (default: origin). |
| remoteBranch | string | — | Remote branch name to push to (if different from local branch name). |
| setUpstream | boolean | — | Set upstream tracking relationship for the branch. |
| tags | boolean | — | Push all tags to the remote. |
| Name | Type | Req | Description |
|---|---|---|---|
| branch | string | yes | Branch that was pushed. |
| pushedRefs | array | yes | References that were successfully pushed. |
| rejectedRefs | array | yes | References that were rejected by the remote. |
| remote | string | yes | Remote name that was pushed to. |
| success | boolean | yes | Indicates if the operation was successful. |
| upstreamSet | boolean | yes | Whether upstream tracking was set for the branch. |
No examples provided.
git_rebase Git Rebase ~158
Rebase commits onto another branch. Reapplies commits on top of another base tip for a cleaner history.
| Name | Type | Req | Description |
|---|---|---|---|
| branch | string | — | Branch to rebase (default: current branch). |
| interactive | boolean | — | Interactive rebase (not supported in all providers). |
| mode | string | — | Rebase operation mode: 'start', 'continue', 'abort', or 'skip'. |
| onto | string | — | Rebase onto different commit than upstream. |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| preserve | boolean | — | Preserve merge commits during rebase. |
| upstream | string | — | Upstream branch to rebase onto (required for start mode). |
| Name | Type | Req | Description |
|---|---|---|---|
| conflictedFiles | array | yes | Files with conflicts that need resolution. |
| conflicts | boolean | yes | Whether rebase had conflicts. |
| currentCommit | string | — | Current commit hash if rebase stopped due to conflict. |
| message | string | — | Human-readable next-step guidance, especially for conflicts. |
| rebasedCommits | integer | yes | Number of commits that were rebased. |
| success | boolean | yes | Indicates if the operation was successful. |
No examples provided.
git_reflog Git Reflog ~97
View the reference logs (reflog) to track when branch tips and other references were updated. Useful for recovering lost commits.
| Name | Type | Req | Description |
|---|---|---|---|
| maxCount | integer | — | Maximum number of items to return (1-1000). |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| ref | string | — | Reference whose reflog to show. Defaults to HEAD. |
| Name | Type | Req | Description |
|---|---|---|---|
| entries | array | yes | Array of reflog entries in reverse chronological order. |
| ref | string | yes | The reference that was queried. |
| success | boolean | yes | Indicates if the operation was successful. |
| totalEntries | integer | yes | Total number of reflog entries. |
No examples provided.
git_remote Git Remote ~159
Manage remote repositories: list remotes, add new remotes, remove remotes, rename remotes, or get/set remote URLs.
| Name | Type | Req | Description |
|---|---|---|---|
| mode | string | — | The remote operation to perform. |
| name | string | — | Remote name for add/remove/rename/get-url/set-url operations. |
| newName | string | — | New remote name for rename operation. |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| push | boolean | — | Set push URL separately (for set-url operation). |
| url | string | — | Remote URL for add/set-url operations. Accepts HTTP(S), SSH (ssh://… or git@host:path), git://, or file:// URLs. |
| Name | Type | Req | Description |
|---|---|---|---|
| added | object | — | Added remote (for add mode). |
| mode | string | yes | Operation mode that was performed. |
| remotes | array | — | List of remotes (for list mode). |
| removed | string | — | Removed remote name (for remove mode). |
| renamed | object | — | Rename information (for rename mode). |
| success | boolean | yes | Indicates if the operation was successful. |
| url | string | — | Remote URL (for get-url mode). |
No examples provided.
git_reset Git Reset ~166
Reset current HEAD to specified state. Can be used to unstage files (soft), discard commits (mixed), or discard all changes (hard).
| Name | Type | Req | Description |
|---|---|---|---|
| confirmed | boolean | — | Explicit confirmation required for hard, merge, and keep reset modes on protected branches (main, master, production, etc.). |
| mode | string | — | Reset mode: soft (keep changes staged), mixed (unstage changes), hard (discard all changes), merge (reset and merge), keep (reset but keep local changes). |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| paths | array | — | Specific file paths to reset (leaves HEAD unchanged). |
| target | string | — | Target commit to reset to. Defaults to HEAD. |
| Name | Type | Req | Description |
|---|---|---|---|
| filesReset | array | yes | Files affected by the reset. For path-only resets, the listed paths. For commit-move resets, files that differ between the old and new HEAD. For --hard with no HEAD move, files whose pending working-… |
| mode | string | yes | Reset mode that was used. |
| previousCommit | string | — | Commit hash HEAD pointed to before the reset (omitted if HEAD did not move). |
| success | boolean | yes | Indicates if the operation was successful. |
| target | string | yes | Commit hash HEAD points to after the reset. |
No examples provided.
git_set_working_dir Git Set Working Directory ~109
Set the session working directory for all git operations so subsequent calls can omit the path parameter. Always returns a repository snapshot (status, recent commits, recent tags, remotes) to orient the caller.
| Name | Type | Req | Description |
|---|---|---|---|
| initializeIfNotPresent | boolean | — | If not a Git repository, initialize it with 'git init'. |
| path | string | yes | Absolute path to the git repository to use as the working directory. |
| validateGitRepo | boolean | — | Validate that the path is a Git repository. |
| Name | Type | Req | Description |
|---|---|---|---|
| enrichmentWarnings | array | — | Actionable notes when snapshot gathering was skipped or partially failed. |
| message | string | yes | Confirmation message. |
| path | string | yes | The working directory that was set. |
| repository | object | — | Best-effort repository snapshot. Omitted when the path is not a git repository (see enrichmentWarnings). |
| success | boolean | yes | Indicates if the operation was successful. |
No examples provided.
git_show Git Show ~147
Show details of a git object (commit, tree, blob, or tag). Displays commit information and the diff of changes introduced.
| Name | Type | Req | Description |
|---|---|---|---|
| filePath | string | — | View specific file at a given commit reference. When provided, shows the file content from the specified object. |
| format | string | — | Output format for the git object. Use "raw" for unprocessed git output. |
| object | string | yes | Git object to show (commit hash, branch, tag, tree, or blob). |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| stat | boolean | — | Show diffstat instead of full diff. |
| Name | Type | Req | Description |
|---|---|---|---|
| content | string | yes | Formatted output showing the object details. |
| metadata | object | — | Additional metadata about the object. |
| object | string | yes | Object identifier. |
| success | boolean | yes | Indicates if the operation was successful. |
| type | string | yes | Type of git object shown. |
No examples provided.
git_stash Git Stash ~184
Manage stashes: list stashes, save current changes (push), restore changes (pop/apply), or remove stashes (drop/clear).
| Name | Type | Req | Description |
|---|---|---|---|
| includeUntracked | boolean | — | Include untracked files in the stash (for push operation). |
| keepIndex | boolean | — | Don't revert staged changes (for push operation). |
| limit | integer | — | For list mode: cap the number of stash entries returned (applied at the git command). |
| message | string | — | Stash message description (for push operation). |
| mode | string | — | The stash operation to perform. Defaults to push (save current changes). |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| stashRef | string | — | Stash reference like stash@{0} (for pop/apply/drop operations). |
| Name | Type | Req | Description |
|---|---|---|---|
| applied | string | — | Applied stash reference (for pop/apply mode). |
| conflicts | boolean | — | Whether operation had conflicts. |
| created | string | — | Created stash reference (for push mode). |
| dropped | string | — | Dropped stash reference (for drop mode). |
| mode | string | yes | Operation mode that was performed. |
| stashes | array | — | List of stashes (for list mode). |
| success | boolean | yes | Indicates if the operation was successful. |
No examples provided.
git_status Git Status ~65
Show the working tree status including staged, unstaged, and untracked files.
| Name | Type | Req | Description |
|---|---|---|---|
| includeUntracked | boolean | — | Include untracked files in the output. |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| Name | Type | Req | Description |
|---|---|---|---|
| ahead | integer | — | Commits ahead of upstream (if tracking). |
| behind | integer | — | Commits behind upstream (if tracking). |
| conflictedFiles | array | yes | Files with merge conflicts that need resolution. |
| currentBranch | — | yes | Current branch name. |
| isClean | boolean | yes | True if working directory is clean (no staged, unstaged, or untracked changes). When includeUntracked is false, untracked files are excluded from this check. |
| stagedChanges | object | yes | Changes that have been staged for the next commit. |
| success | boolean | yes | Indicates if the operation was successful. |
| unstagedChanges | object | yes | Changes in the working directory that have not been staged. |
| untrackedFiles | array | yes | Files in the working directory not tracked by git. |
| upstream | string | — | Upstream ref the current branch is tracking (if any). |
No examples provided.
git_tag Git Tag ~277
Manage tags: list all tags, create a new tag, delete a tag, or verify a signed tag. Tags are used to mark specific points in history (releases, milestones). Verify runs `git tag -v` and returns a structured result distinguishing unsigned tags, missing trust configuration, bad signatures, and valid signatures.
| Name | Type | Req | Description |
|---|---|---|---|
| annotated | boolean | — | Create an annotated tag with a default "Tag <name>" message. Only effective when no message is provided and signing is disabled — otherwise the tag is always annotated. |
| commit | string | — | Commit to tag (default: HEAD for create operation). |
| force | boolean | — | Overwrite an existing tag (create mode only; has no effect on list or delete). |
| limit | integer | — | For list mode: cap the number of tags returned (applied at the git command via `--count=N`). Use on repos with many tags. |
| message | string | — | Tag message. Providing a message always produces an annotated tag (git does not support messages on lightweight tags). For release tags, summarize notable changes. |
| mode | string | — | The tag operation to perform. |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| tagName | string | — | Tag name for create/delete/verify operations. |
| Name | Type | Req | Description |
|---|---|---|---|
| created | string | — | Created tag name (for create mode). |
| deleted | string | — | Deleted tag name (for delete mode). |
| mode | string | yes | Operation mode that was performed. |
| rawOutput | string | — | Raw stderr from `git tag -v` for callers that need the full verification output (verify mode only). |
| signatureType | string | — | Signature algorithm family when detectable from `git tag -v` output (verify mode). Absent for unsigned tags or unparseable output. |
| signed | boolean | — | Whether the created tag was signed. Only populated for create mode. False when GIT_SIGN_COMMITS=false or when signing failed and fell back to unsigned. |
| signerIdentity | string | — | Signer identity as emitted by git — e.g., `Name <email>` for GPG or the SSH principal. Verify mode only. |
| signerKey | string | — | Key material emitted by git — GPG fingerprint/key ID or SSH key fingerprint (`SHA256:…`). Verify mode only; absent when git did not surface it. |
| signingWarning | string | — | Populated only when signing was requested but failed, and the tag was created unsigned as a fallback. |
| success | boolean | yes | Indicates if the operation was successful. |
| tags | array | — | List of tags (for list mode). |
| verified | boolean | — | Whether the signature validated (for verify mode). `false` for unsigned tags, missing trust config, bad signatures, or unparseable output — inspect `warning` to distinguish. |
| verifiedTag | string | — | Verified tag name (for verify mode). Echoes the input so callers can correlate results in batched flows. |
| warning | string | — | Populated on verify failure with a human-readable reason distinguishing unsigned tags, missing trust configuration, bad signatures, and unparseable output. |
No examples provided.
git_worktree Git Worktree ~257
Manage multiple working trees: list worktrees, add new worktrees for parallel work, remove worktrees, or move worktrees to new locations.
| Name | Type | Req | Description |
|---|---|---|---|
| branch | string | — | For add operation: create a NEW branch with this name in the new worktree. Fails if the branch already exists — use `commitish` to check out an existing branch instead. |
| commitish | string | — | For add operation: check out this existing branch/commit/tag in the new worktree (no new branch is created). |
| detach | boolean | — | Create worktree with detached HEAD (for add operation). |
| dryRun | boolean | — | Preview the operation without executing it (for prune operation). |
| force | boolean | — | Force operation (for remove operation with uncommitted changes). |
| mode | string | — | The worktree operation to perform. |
| newPath | string | — | New path for the worktree (for move operation). |
| path | string | — | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. |
| verbose | boolean | — | Provide detailed output for worktree operations. |
| worktreePath | string | — | Path for the new worktree (for add/move operations). |
| Name | Type | Req | Description |
|---|---|---|---|
| added | string | — | Added worktree path (for add mode). |
| mode | string | yes | Operation mode that was performed. |
| moved | object | — | Move operation info (for move mode). |
| pruned | array | — | Pruned worktree paths (for prune mode). |
| removed | string | — | Removed worktree path (for remove mode). |
| success | boolean | yes | Indicates if the operation was successful. |
| worktrees | array | — | List of worktrees (for list mode). |
No examples provided.
git_wrapup_instructions Git Wrap-up Instructions ~157
Returns a Git wrap-up protocol: an acceptance-criteria checklist the agent must satisfy before the session is considered shipped. Uses the operator's custom instructions if configured, otherwise emits a generic goals-strict/mechanism-generic default. Enriches the response with a repository snapshot (status, recent commits, recent tags) so the agent has immediate orientation for the commit and release steps.
| Name | Type | Req | Description |
|---|---|---|---|
| acknowledgement | string | yes | Acknowledgement to initiate the wrap-up workflow. |
| createTag | boolean | — | Controls whether the tag criterion appears in the emitted protocol. Omit or set `true` to include the tag step. Set `false` to omit it entirely — e.g., when tagging is deferred to a separate release… |
| Name | Type | Req | Description |
|---|---|---|---|
| enrichmentWarnings | array | — | Actionable notes when snapshot gathering was skipped or partially failed. |
| instructions | string | yes | The wrap-up protocol to satisfy before the session ships. |
| repository | object | — | Best-effort repository snapshot. Omitted when no working directory is set or when the path is not a git repository. |
No examples provided.