Skip to main content
Glama
jolfr

Commit Helper MCP

by jolfr

create_commit_message

Generate and validate conventional commit messages using input answers to standard commit questions, streamlining version control workflows with structured, AI-assisted commit messages.

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

Implementation Reference

  • The MCP tool handler for 'create_commit_message'. It takes a dictionary of commit answers, generates a commit message using the service, validates it, and returns a success response with the message and validation status.
    @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)

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