refresh_configuration
Reload and update Commitizen settings to ensure commit message tools function with current configurations.
Instructions
Refresh the Commitizen configuration and reinitialize the service.
Returns: Dict containing refresh status and new configuration info
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The core handler function for the 'refresh_configuration' tool, decorated with @mcp.tool(). It refreshes the Commitizen service configuration and returns updated status information.@mcp.tool() @handle_errors(log_errors=True) def refresh_configuration() -> Dict[str, Any]: """ Refresh the Commitizen configuration and reinitialize the service. Returns: Dict containing refresh status and new configuration info """ try: service.refresh_config() except Exception as e: raise ConfigurationError( "Failed to refresh configuration", config_file="commitizen config", cause=e ) info = service.get_info() result = { "status": "refreshed", "new_config": info, "timestamp": str(__import__("datetime").datetime.now()), } return create_success_response(result)
- src/commit_helper_mcp/mcp_server.py:46-51 (registration)Import statement in the main MCP server module that brings in the refresh_configuration tool from workflow_tools, ensuring it is registered and available via the MCP server.from .server.workflow_tools import ( get_commit_questions, health_check, refresh_configuration, commit_workflow_step, )