GitTool provides methods to execute common Git operations on local repositories.
Installation
Install the Git dependency:Constructor
Optional API key for MCP server usage
Methods
clone
Clone a repository from a remote URL.Git repository URL (HTTPS or SSH)
Local path where repository will be cloned
pull
Pull changes from the remote repository.Path to local Git repository
commit
Commit all changes in the repository.Path to local Git repository
Commit message
push
Push commits to the remote repository.Path to local Git repository
status
Get the current status of the repository.Path to local Git repository
Usage
With Agentor agent
Clone a repository
Commit and push workflow
Pull updates
Notes
The
commit method automatically stages all changes (equivalent to git add -A) before committing.Error handling
Source reference
src/agentor/tools/git.py:25