Server Configuration
Describes the environment variables required to run the server.
Name | Required | Description | Default |
---|---|---|---|
No arguments |
Schema
Prompts
Interactive templates invoked by user choice
Name | Description |
---|---|
No prompts |
Resources
Contextual data attached and managed by the client
Name | Description |
---|---|
get_config_resource | Get current Commitizen configuration as a resource. Returns: String representation of the current configuration |
get_schema_resource | Get commit message schema as a resource. Returns: String representation of the commit message schema |
get_example_resource | Get example commit message as a resource. Returns: String containing an example commit message |
Tools
Functions exposed to the LLM to take actions
Name | Description |
---|---|
generate_commit_message | Generate a commit message with validation using provided parameters. Args: type: The commit type (e.g., 'feat', 'fix', 'docs') subject: The commit subject/description body: Optional commit body with detailed description scope: Optional scope of the change breaking: Whether this is a breaking change footer: Optional footer (e.g., issue references) include_git_preview: Whether to include git preview in response Returns: Dict containing the generated message and validation status |
create_commit_message | 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 |
validate_commit_message | Validate an existing commit message against the current plugin's rules. Args: message: The commit message to validate Returns: Dict containing validation result and details |
get_commit_types | Get list of available commit types from the current plugin. Returns: Dict containing available commit types and their descriptions |
get_git_implementation_info | Get information about the current git implementation and available features. Returns: Dict containing: - git_enabled: Whether git operations are available - implementation: Current git implementation ("GitPython") - enhanced_features: Whether enhanced features are available - features: Dict of available feature flags |
get_enhanced_git_status | Get enhanced git repository status with detailed information. Uses GitPython features when available for richer information:
Args: repo_path: Path to git repository Returns: Dict containing enhanced repository status |
get_git_status | Get current git repository status and staged files. Args: repo_path: Path to git repository Returns: Dict containing: - git_enabled: Whether git operations are available - staged_files: List of staged file paths - staged_count: Number of staged files - repository_path: Path to git repository - repository_status: Additional status information |
preview_git_commit | Preview git commit operation without executing (dry-run mode). Args: message: Commit message to preview repo_path: Path to git repository stage_all: Whether to stage all changes before commit (not implemented yet) sign_off: Whether to add sign-off to commit (default: True) Returns: Dict containing: - message: The commit message - is_valid: Whether message passes validation - files_to_commit: List of files that would be committed - dry_run: Always True for this tool - repository_status: Current repository state |
execute_git_commit | Execute actual git commit with safety checks and user approval. SAFETY: Requires force_execute=True to perform actual commit. Args: message: Commit message to use repo_path: Path to git repository stage_all: Whether to stage all changes before commit (not implemented yet) sign_off: Whether to add sign-off to commit (default: True) force_execute: Must be True to execute actual commit (safety flag) Returns: Dict containing: - success: Whether commit was successful - message: The commit message used - executed: Whether commit was actually executed - error: Error message (if failed) - dry_run: False if actually executed, True if preview only |
generate_and_commit | Generate commit message and optionally execute commit in one step. Combines message generation with git operations for streamlined workflow. Args: type: Commit type (feat, fix, docs, etc.) subject: Commit subject/description repo_path: Path to git repository body: Optional detailed description scope: Optional scope of changes breaking: Whether this is a breaking change footer: Optional footer (e.g., issue references) stage_all: Whether to stage all changes (not implemented yet) sign_off: Whether to add sign-off to commit (default: True) preview_only: If True, only preview (default for safety) Returns: Dict containing: - message: Generated commit message - is_valid: Whether message is valid - git_preview: Preview of git operation (if preview_only=True) - commit_result: Commit execution result (if preview_only=False) |
validate_commit_readiness | Comprehensive validation of repository readiness for commit. Args: repo_path: Path to git repository Returns: Dict containing: - ready_to_commit: Boolean overall readiness - checks: Dict of individual validation checks - recommendations: List of actions to take before commit |
stage_files_and_commit | Stage specific files and commit with provided message. Useful for selective commits of specific files. Args: files: List of file paths to stage message: Commit message to use repo_path: Path to git repository sign_off: Whether to add sign-off to commit (default: True) dry_run: Preview only (default True for safety) Returns: Dict containing staging and commit results |
get_commit_questions | Get interactive questions for commit message generation. Returns: Dict containing the questions and metadata |
health_check | Check the health and status of the Commitizen service. Returns: Dict containing service health information |
refresh_configuration | Refresh the Commitizen configuration and reinitialize the service. Returns: Dict containing refresh status and new configuration info |
commit_workflow_step | Multi-step commit workflow with state management. Args: workflow_data: Workflow state data step: Current step ("generate" | "preview" | "approve" | "execute") Returns: Dict with workflow state and next step information |
analyze_repository_health | Comprehensive repository health analysis using GitPython features. Provides detailed analysis including:
Args: repo_path: Path to git repository Returns: Dict containing comprehensive repository analysis |
get_detailed_diff_analysis | Get detailed diff analysis between working directory and specified commit. Uses GitPython to provide:
Args: repo_path: Path to git repository compare_with: Commit/branch to compare with (default: HEAD) include_content: Whether to include actual diff content Returns: Dict containing detailed diff analysis |
get_branch_analysis | Get comprehensive branch analysis using GitPython. Provides information about:
Args: repo_path: Path to git repository Returns: Dict containing branch analysis |
smart_commit_suggestion | Intelligent commit message suggestions based on repository changes. Uses GitPython to analyze staged changes and suggest:
Args: repo_path: Path to git repository analyze_changes: Whether to analyze file changes for suggestions suggest_type: Whether to suggest commit type suggest_scope: Whether to suggest scope Returns: Dict containing intelligent commit suggestions |
batch_commit_analysis | Analyze multiple file groups for batch commit operations. Helps organize staged changes into logical commit groups with appropriate commit messages for each group. Args: repo_path: Path to git repository file_groups: List of file groups with metadata generate_messages: Whether to generate commit messages for each group Returns: Dict containing batch commit analysis and suggestions |