The three Git tools expose the most common local Git operations without requiring shell access.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/XxYouDeaDPunKxX/chatgpt-local-agent-mcp/llms.txt
Use this file to discover all available pages before exploring further.
git_status and git_diff are read-only and run at observe policy mode, so they are available in every server configuration except the most locked-down. git_commit mutates repository history and therefore requires destructive policy mode, even though it does not overwrite any tracked files on disk. All three require the mcp:git scope, which is granted independently of mcp:shell — you can give ChatGPT Git visibility without giving it a general-purpose shell.
These tools invoke the
git binary from PATH. Git must be installed on the Windows machine running the MCP server.git_status
Required scope:mcp:gitPolicy mode:
observeRisk tags:
repo-state
Returns the working tree status for a repository, equivalent to git status --short --branch. The output includes the current branch, tracked files with staged or unstaged modifications, and untracked files. Use this to understand the state of a repo before deciding what to stage or commit.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
cwd | string | ✅ | Repository working directory. |
| Field | Description |
|---|---|
cwd | The resolved working directory used for the command. |
stdout | Raw git status --short --branch output. |
stderr | Any error output from Git. |
code | Exit code (0 = success). |
timedOut | Whether the command was terminated due to timeout. |
outputLimitExceeded | Whether output was truncated at the server’s byte limit. |
git_diff
Required scope:mcp:gitPolicy mode:
observeRisk tags:
repo-content
Returns the diff for a repository, equivalent to git diff (unstaged changes) or git diff --cached (staged changes). The staged flag selects between these two modes. Use this to review what has changed before committing, or to verify that a patch was applied correctly.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
cwd | string | ✅ | Repository working directory. |
staged | boolean | — | When true, shows staged (cached) changes. Defaults to false. |
| Field | Description |
|---|---|
cwd | The resolved working directory used for the command. |
staged | The staged value that was used. |
stdout | Raw diff output. |
stderr | Any error output from Git. |
code | Exit code (0 = success). |
timedOut | Whether the command was terminated due to timeout. |
outputLimitExceeded | Whether output was truncated at the server’s byte limit. |
git_commit
Required scope:mcp:gitPolicy mode:
destructiveRisk tags:
commit, repo-mutation
Creates a Git commit with the provided message. By default, commits whatever is currently staged. The addAll flag runs git add -A before committing, staging all tracked and untracked changes. The allowEmpty flag permits a commit even when there is nothing staged. Requires confirm: true when dryRun: false.
A dryRun: true call (the default) runs git status --short on the repository instead of committing, letting you see what would be included without mutating history. This is a safe way to verify staging state before proceeding.
git_commit requires destructive policy mode because it permanently mutates repository history, even though it does not overwrite working tree files. Treat it with the same caution as a file-write operation.| Parameter | Type | Required | Description |
|---|---|---|---|
message | string | ✅ | Commit message. Must be at least 1 character. |
cwd | string | ✅ | Repository working directory. |
dryRun | boolean | — | Show status instead of committing. Defaults to true. |
confirm | boolean | — | Required when executing with dryRun: false. |
addAll | boolean | — | Run git add -A before committing. Defaults to false. |
allowEmpty | boolean | — | Allow a commit with no staged changes. Defaults to false. |
| Field | Description |
|---|---|
auditQuality | Always "granular" — indicates the operation was journaled with full detail. |
cwd | The resolved working directory used for the command. |
dryRun | Whether the call was a dry run. |
confirmed | The value of the confirm parameter that was used. |
stdout | Raw git commit (or git status) output. |
stderr | Any error output from Git. |
code | Exit code (0 = success). |
timedOut | Whether the command was terminated due to timeout. |
outputLimitExceeded | Whether output was truncated at the server’s byte limit. |
Typical ChatGPT-assisted commit workflow
The three Git tools compose naturally into a review-then-commit sequence. A typical workflow looks like this: Step 1 — check current status"staged": true.
Step 3 — dry-run the commit to confirm staging state
git_commit returns the current git status --short output so you can confirm what will be included.
Step 4 — execute the commit
code: 0 response confirms the commit was created. The stdout field contains the standard git commit output including the new commit SHA.
When you need more than these three tools
git_status, git_diff, and git_commit cover the most common local workflow. For operations beyond these — such as git log, git stash, git rebase, git push, git pull, branch management, or arbitrary git subcommands — use the shell tool with the mcp:shell scope enabled.
mcp:shell grants unrestricted command execution. Enable it only when you need Git operations that the dedicated git tools do not cover, and consider using workspace_guarded shell policy to limit the command working directory.