get_settings_info
Retrieve project configuration details to understand code repository settings and analysis parameters.
Instructions
Get information about the project settings.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- Core implementation of get_settings_info tool logic in SettingsService, handling settings retrieval, config/stats loading, and response formatting.def get_settings_info(self) -> Dict[str, Any]: """ Get comprehensive settings information. Handles the logic for get_settings_info MCP tool. Returns: Dictionary with settings directory, config, stats, and status information """ temp_dir = os.path.join(tempfile.gettempdir(), SETTINGS_DIR) # Get the actual index directory from the index manager index_manager = get_index_manager() actual_temp_dir = index_manager.temp_dir if index_manager.temp_dir else temp_dir # Check if base_path is set if not self.base_path: return ResponseFormatter.settings_info_response( settings_directory="", temp_directory=actual_temp_dir, temp_directory_exists=os.path.exists(actual_temp_dir), config={}, stats={}, exists=False, status="not_configured", message="Project path not set. Please use set_project_path to set a " "project directory first." ) # Get config and stats config = self.settings.load_config() if self.settings else {} stats = self.settings.get_stats() if self.settings else {} settings_directory = actual_temp_dir exists = os.path.exists(settings_directory) if settings_directory else False return ResponseFormatter.settings_info_response( settings_directory=settings_directory, temp_directory=actual_temp_dir, temp_directory_exists=os.path.exists(actual_temp_dir), config=config, stats=stats, exists=exists )
- src/code_index_mcp/server.py:282-286 (registration)MCP tool registration using @mcp.tool() decorator with error handling wrapper that delegates to SettingsService.get_settings_info().@mcp.tool() @handle_mcp_tool_errors(return_type='dict') def get_settings_info(ctx: Context) -> Dict[str, Any]: """Get information about the project settings.""" return SettingsService(ctx).get_settings_info()