Skip to main content
Glama
jolfr

Commit Helper MCP

by jolfr

create_commit_message

Generate conventional commit messages from structured answers to commit questions, providing validation status for proper formatting.

Instructions

Generate a commit message from a complete answers dictionary.

Args: answers_dict: Dictionary containing all answers to commit questions

Returns: Dict containing the generated message and validation status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
answers_dictYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core handler function decorated with @mcp.tool() that implements the 'create_commit_message' tool logic. It takes a dictionary of answers, generates a commit message using the service, validates it, and returns the result.
    @mcp.tool()
    @handle_errors(log_errors=True)
    def create_commit_message(answers_dict: Dict[str, Any]) -> Dict[str, Any]:
        """
        Generate a commit message from a complete answers dictionary.
    
        Args:
            answers_dict: Dictionary containing all answers to commit questions
    
        Returns:
            Dict containing the generated message and validation status
        """
        # Check for required fields
        if "type" not in answers_dict or "subject" not in answers_dict:
            raise create_validation_error(
                "Missing required fields in answers dictionary",
                validation_type="commit_answers",
                invalid_value=str(answers_dict.keys()),
            )
    
        # Generate the message using the service
        message = service.generate_message(answers_dict)
    
        # Validate the generated message
        is_valid = service.validate_message(message)
    
        if not is_valid:
            raise create_validation_error(
                "Generated message failed validation",
                validation_type="commit_message",
                invalid_value=message,
            )
    
        result = {"message": message, "is_valid": is_valid, "answers": answers_dict}
    
        return create_success_response(result)
Behavior2/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 states the tool generates a commit message and returns a dict with message and validation status, but lacks details on permissions, rate limits, error handling, or whether it's read-only or mutative. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

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: the first sentence states the purpose clearly, followed by structured Args and Returns sections. There's no wasted text, but the formatting with quotes and line breaks could be slightly cleaner for direct readability.

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

Completeness3/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 (one parameter with nested objects), no annotations, and an output schema present, the description is partially complete. It covers the basic purpose and parameter intent, but lacks context on integration with siblings (e.g., dependency on 'get_commit_questions'), behavioral traits, and error scenarios, making it adequate but with clear gaps.

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

Parameters3/5

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

The description adds some meaning beyond the input schema: it specifies that 'answers_dict' is a 'Dictionary containing all answers to commit questions', which clarifies its purpose and content. However, with 0% schema description coverage and only one parameter, this provides basic context but doesn't detail structure, required fields, or examples, leaving room for improvement.

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's purpose: 'Generate a commit message from a complete answers dictionary.' It specifies the verb 'Generate' and the resource 'commit message', and distinguishes it from siblings like 'generate_commit_message' by mentioning the input format. However, it doesn't fully differentiate from 'smart_commit_suggestion' or 'generate_and_commit' in terms of scope or context.

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 minimal guidance: it implies usage when you have a 'complete answers dictionary', but offers no explicit when-to-use vs. alternatives like 'generate_commit_message' or 'smart_commit_suggestion'. There's no mention of prerequisites, such as needing to call 'get_commit_questions' first, or exclusions for other contexts.

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