refresh_configuration
Reload Commitizen settings and restart the service to ensure updated configurations are applied. Returns status and new configuration details for verification.
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() for automatic MCP registration. Calls service.refresh_config() to reload Commitizen 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)Explicit import of the refresh_configuration function from workflow_tools module in the main MCP server file, ensuring it's available and exported via __all__.from .server.workflow_tools import ( get_commit_questions, health_check, refresh_configuration, commit_workflow_step, )