Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| REPO_PATH | No | Set the default absolute path to your git repository to avoid passing repo_path in every tool call. |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| initialize_repo | Initialize a new git repository at the specified path. This tool creates a Args: repo_path: The absolute path to the directory where the git repository should be initialized. If the directory does not exist, it will be created. initial_commit: If True, and the repository is empty or fresh, an initial commit will be created. This includes creating a README.md if one doesn't exist. Default is True. Returns: A status message indicating whether the repository was initialized, already existed, or if an initial commit was created. |
| get_repo_status | Get the current status of the git repository. This tool provides a snapshot of the repository's state, including:
Use this tool before committing to verify what changes will be included, or to simply check the current context (branch, pending changes). Args: repo_path: The absolute path to the repository. Returns: A JSON-formatted string containing the repository status details. |
| commit_all_changes | Stage ALL changes (including untracked files) and create a commit. This tool acts as a "save point" for the project. It performs the equivalent of:
It will automatically initialize the repository if it hasn't been initialized yet. Args: repo_path: The absolute path to the repository. message: A descriptive commit message. Common prefixes: 'feat:', 'fix:', 'docs:', 'refactor:', 'test:'. Returns: The SHA (full hash) of the new commit, or a message indicating "No changes to commit" if the working directory was clean. |
| list_commits | List the commit history for a specific branch or reference. Retrieves a list of commits starting from the specified
Args: repo_path: The absolute path to the repository. branch: The branch name, tag, or commit SHA to start listing from. Defaults to "HEAD" (current checkout). limit: The maximum number of commits to return. Defaults to 50. Returns: A JSON-formatted string containing a list of commit objects. |
| rollback_to_commit | Roll back the repository state to a previous commit. This tool resets the current branch head to
Args: repo_path: The absolute path to the repository. commit_sha: The full or short SHA of the commit to revert to. mode: The reset mode: "soft", "mixed", or "hard". Returns: A message confirming the rollback and the new HEAD SHA. |
| compare_commits | Compare two commits and return the diff. This tool generates a detailed comparison between two points in the history (
The output includes a summary of file changes (added, modified, deleted, renamed) and the actual diff content for each file. Args: repo_path: The absolute path to the repository. from_commit: The source (older) commit SHA. to_commit: The target (newer) commit SHA. Returns: A JSON-formatted string containing the list of changed files, additions/deletions counts, and diff patches. |
| create_branch | Create a new git branch. This tool creates a new branch pointer but DOES NOT switch to it.
To start working on the new branch, you must call Args: repo_path: The absolute path to the repository. branch_name: The name of the new branch (e.g., "feature/new-login"). from_ref: The commit SHA or branch name to start the new branch from. If not provided, defaults to the current HEAD. Returns: A confirmation message containing the new branch name. |
| switch_branch | Switch the repository to a different branch. This command updates the working directory to match the state of the specified branch.
It performs a Args: repo_path: The absolute path to the repository. branch_name: The name of the branch to switch to. The branch must already exist. Returns: A confirmation message indicating the successful switch and current branch name. |
| list_branches | List all branches in the repository. Shows all local branches with current branch marked. Args: repo_path: Path to the repository directory Returns: JSON list of branches with current branch indicator |
| generate_commit_message | Generate a suggested commit message based on staged changes. This tool analyzes the staged and modified files to suggest a commit message. Note: This uses a simple heuristic (template-based), not a full LLM analysis of the diff content. It is useful as a starting point or for quick commits. Styles:
Args: repo_path: The absolute path to the repository. style: The message style format to use. Defaults to "conventional". Returns: A string containing the suggested commit message and a brief summary of detected changes. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |