Skip to main content
Glama

get_settings_info

Retrieve essential details about project settings to facilitate efficient indexing, search, and analysis of code repositories within the MCP framework.

Instructions

Get information about the project settings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool registration and handler function for get_settings_info. This is the entry point decorated with @mcp.tool() that executes the tool logic by delegating to SettingsService.
    @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()
  • Core helper function in SettingsService that implements the get_settings_info tool logic, providing project settings information, stats, and status.
    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 )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/johnhuang316/code-index-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server