get_file_watcher_status
Check the status and statistics of the file watcher service to monitor code indexing operations and ensure proper functionality.
Instructions
Get file watcher service status and statistics.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/code_index_mcp/server.py:315-320 (handler)MCP tool handler function decorated with @mcp.tool(), which registers the tool and executes its logic by delegating to SystemManagementService.get_file_watcher_status().@mcp.tool() @handle_mcp_tool_errors(return_type='dict') def get_file_watcher_status(ctx: Context) -> Dict[str, Any]: """Get file watcher service status and statistics.""" return SystemManagementService(ctx).get_file_watcher_status()
- Dataclass defining the output schema/structure for the file watcher status returned by the tool.@dataclass class FileWatcherStatus: """Business result for file watcher status operations.""" available: bool active: bool status: str message: Optional[str] error_info: Optional[Dict[str, Any]] configuration: Dict[str, Any] rebuild_status: Dict[str, Any] recommendations: list[str]
- Core helper method in SystemManagementService that implements the business logic for retrieving and formatting the file watcher status.def get_file_watcher_status(self) -> Dict[str, Any]: """ Get comprehensive file watcher status with business intelligence. This is the main business method that orchestrates the file watcher status workflow, analyzing system state, providing recommendations, and formatting comprehensive status information. Returns: Dictionary with comprehensive file watcher status """ # Business workflow: Analyze system state status_result = self._analyze_file_watcher_state() # Business result formatting return self._format_status_result(status_result)