clear_settings
Reset cached data and configurations within the code-index-mcp server to ensure clean, optimized performance for code repository indexing and analysis.
Instructions
Clear all settings and cached data.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/code_index_mcp/server.py:300-304 (handler)The handler function for the 'clear_settings' MCP tool. It is registered using the @mcp.tool() decorator and delegates the execution to SettingsService.clear_all_settings().@mcp.tool() @handle_mcp_tool_errors(return_type='str') def clear_settings(ctx: Context) -> str: """Clear all settings and cached data.""" return SettingsService(ctx).clear_all_settings()
- Supporting method in SettingsService that performs the actual clearing of settings and returns a success message. Called by the clear_settings tool handler.def clear_all_settings(self) -> str: """ Clear all settings and cached data. Handles the logic for clear_settings MCP tool. Returns: Success message confirming settings were cleared """ if self.settings: self.settings.clear() return "Project settings, index, and cache have been cleared."