GitTool provides methods to execute common Git operations on local repositories.
Installation
Install the Git dependency:Constructor
str
Optional API key for MCP server usage
Methods
clone
Clone a repository from a remote URL.str
required
Git repository URL (HTTPS or SSH)
str
required
Local path where repository will be cloned
pull
Pull changes from the remote repository.str
required
Path to local Git repository
commit
Commit all changes in the repository.str
required
Path to local Git repository
str
required
Commit message
push
Push commits to the remote repository.str
required
Path to local Git repository
status
Get the current status of the repository.str
required
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