Skip to main content
Glama
jolfr

Commit Helper MCP

by jolfr

get_enhanced_git_status

Retrieve detailed Git repository status including file changes, commit history, and repository analytics to support commit message generation and validation.

Instructions

Get enhanced git repository status with detailed information.

Uses GitPython features when available for richer information:

  • Detailed file status (staged, unstaged, untracked)

  • Recent commit history with statistics

  • Repository analytics (total commits, branches, tags)

  • Current branch and HEAD information

Args: repo_path: Path to git repository

Returns: Dict containing enhanced repository status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The MCP tool handler function for 'get_enhanced_git_status'. Decorated with @mcp.tool(), it initializes a CommitzenService for the given repo_path, retrieves the repository status, adds enhanced metadata, and returns a formatted success response.
    @mcp.tool()
    @handle_errors(log_errors=True)
    def get_enhanced_git_status(repo_path: str) -> Dict[str, Any]:
        """
        Get enhanced git repository status with detailed information.
    
        Uses GitPython features when available for richer information:
        - Detailed file status (staged, unstaged, untracked)
        - Recent commit history with statistics
        - Repository analytics (total commits, branches, tags)
        - Current branch and HEAD information
    
        Args:
            repo_path: Path to git repository
    
        Returns:
            Dict containing enhanced repository status
        """
        # Initialize service with specific repository
        try:
            target_service = CommitzenService(repo_path=repo_path)
        except Exception as e:
            raise RepositoryError(
                f"Failed to initialize service for repository '{repo_path}'",
                repo_path=repo_path,
                cause=e,
            )
    
        if not target_service.git_enabled:
            raise RepositoryError(
                "Git operations not available - not in a git repository",
                repo_path=repo_path,
            )
    
        status = target_service.get_repository_status()
    
        if "error" in status:
            raise GitOperationError(status["error"], repo_path=repo_path)
    
        status["enhanced_features_used"] = True
        status["implementation"] = target_service.git_implementation
    
        return create_success_response(
            {"repository_status": status, "repository_path": repo_path}
        )
  • Import of the git_tools module in the main MCP server file, which executes the @mcp.tool() decorators to register the get_enhanced_git_status tool.
    from .server import git_tools
  • Explicit import of the get_enhanced_git_status function from git_tools for use and export in the main server module.
    from .server.git_tools import (
        get_git_implementation_info,
        get_enhanced_git_status,
        get_git_status,
        preview_git_commit,
        execute_git_commit,
        generate_and_commit,
        validate_commit_readiness,
        stage_files_and_commit,
    )
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds context about GitPython features and the types of information returned (e.g., file status, commit history, analytics), which helps understand the tool's behavior beyond basic status retrieval. However, it doesn't cover aspects like performance, error handling, or dependencies, leaving gaps in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, starting with the core purpose followed by bullet points for details and parameter/return sections. Every sentence adds value, but the bullet points could be slightly more concise. Overall, it's well-structured with minimal waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (enhanced status retrieval), no annotations, and an output schema present (so return values needn't be explained), the description is fairly complete. It covers the purpose, features, parameter, and return type adequately. However, it lacks details on error cases or integration with sibling tools, leaving room for improvement.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must compensate. It explicitly documents the single parameter 'repo_path' as 'Path to git repository', adding clear meaning beyond the schema's minimal title. With only one parameter, this is sufficient, though it could provide more details like format examples or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool 'gets enhanced git repository status with detailed information', specifying the verb 'get' and resource 'git repository status'. It distinguishes from the sibling 'get_git_status' by emphasizing 'enhanced' and 'detailed information', though it doesn't explicitly contrast them. The purpose is specific but could be more explicit about differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_git_status' or other sibling tools. It mentions using GitPython features 'when available', which hints at prerequisites, but lacks explicit when/when-not instructions or named alternatives. Usage context is implied but insufficient for clear decision-making.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jolfr/commit-helper-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server