MCP Tools
All Git operations are declared as Model Context Protocol (MCP) tools in gitAgent/mcp-config.json and executed through gitAgent/tools/git_tool.sh.
Tool Groups
| Group | Tools | Purpose |
|---|---|---|
| Repository inspection | git_info, git_status, git_diff, git_repos_overview, git_diagnose |
Read repository shape, branch/upstream state, diffs, and diagnostics. |
| Index and working tree control | git_stage, git_unstage, git_untrack, git_check_ignore, git_add_ignore, git_remove_ignore, git_restore |
Manage stage state, ignore rules, ignore checks, and restore operations. |
| Conflict handling | git_conflict_versions, git_checkout_conflict |
Read conflict sides and apply ours/theirs selection. |
| Stash and commit flow | git_stash, git_stash_pop, git_stash_list, git_commit |
Temporarily store changes and create commits. |
| Remote and identity | git_push, git_pull, git_identity, git_set_identity |
Run remote operations and manage author identity settings. |
| GitHub auth bridge | git_auth_status, git_auth_begin, git_auth_poll, git_auth_disconnect, git_auth_store_token |
Manage GitHub token lifecycle used by push and pull operations. |
Common Input Rules
Most tools require a path argument and reject values outside allowed workspace roots. Operations that target subsets use files arrays, remote operations can accept token overrides through token, and conflict checkout requires source constrained to {"ours","theirs"}.
Execution Characteristics
Each invocation starts a new Node process through the wrapper script. Git subprocesses run with timeout and error-normalization behavior, and failures are returned as explicit MCP JSON payloads with ok: false.