This document lists all the Git tools available in the MCP Git Commit Generator project.
-
Description: Shows the working tree status
-
Input Schema:
{ "repo_path": "string" }
-
Description: Shows changes in the working directory that are not yet staged
-
Input Schema:
{ "repo_path": "string", "context_lines": 3 }
-
Description: Shows changes that are staged for commit
-
Input Schema:
{ "repo_path": "string", "context_lines": 3 }
-
Description: Shows differences between branches or commits
-
Input Schema:
{ "repo_path": "string", "target": "string", "context_lines": 3 }
-
Description: Records changes to the repository
-
Input Schema:
{ "repo_path": "string", "message": "string" }
-
Description: Adds file contents to the staging area
-
Input Schema:
{ "repo_path": "string", "files": ["string"] }
-
Description: Unstages all staged changes
-
Input Schema:
{ "repo_path": "string" }
-
Description: Shows the commit logs
-
Input Schema:
{ "repo_path": "string", "max_count": 10 }
-
Description: Creates a new branch from an optional base branch
-
Input Schema:
{ "repo_path": "string", "branch_name": "string", "base_branch": "string" }
-
Description: Switches branches
-
Input Schema:
{ "repo_path": "string", "branch_name": "string" }
-
Description: Shows the contents of a commit
-
Input Schema:
{ "repo_path": "string", "revision": "string" }
-
Description: Initialize a new Git repository
-
Input Schema:
{ "repo_path": "string" }
-
Description: List Git branches
-
Input Schema:
{ "repo_path": "string", "branch_type": "local|remote|all", "contains": "string", "not_contains": "string" }
-
Description: Generate conventional commit message analysis (optimized)
-
Input Schema:
{ "repo_path": "string", "commit_type": "string", "scope": "string", "lite_mode": false }
-
Description: Fast git status check using GitPython (optimized)
-
Input Schema:
{ "repo_path": "string" }
To use any of these tools, you can call them through the MCP server interface. Here's an example of how to get the repository status:
from mcp.server import Server
from mcp.types import TextContent
server = Server("Git Commit Generator MCP")
# Call the git_status tool
response = await server.call_tool("git_status", {
"repo_path": "/path/to/your/repository"
})
# Process the response
for content in response:
if isinstance(content, TextContent):
print(content.text)- All file paths should be absolute paths
- The
repo_pathparameter is required for all tools exceptgit_init - For tools that accept a
context_linesparameter, it defaults to 3 if not specified - The
lite_modeparameter ingenerate_commit_messageprovides faster but less detailed analysis when set totrue