refresh_search_tools
Re-detect available command-line search tools on your system. Use this when you install new tools like ripgrep after server startup to ensure they are recognized.
Instructions
Manually re-detect the available command-line search tools on the system. This is useful if you have installed a new tool (like ripgrep) after starting the server.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/code_index_mcp/server.py:307-314 (handler)MCP tool handler and registration for 'refresh_search_tools'. This is the entry point decorated with @mcp.tool() that executes the tool logic by delegating to SearchService.refresh_search_tools().@handle_mcp_tool_errors(return_type='str') def refresh_search_tools(ctx: Context) -> str: """ Manually re-detect the available command-line search tools on the system. This is useful if you have installed a new tool (like ripgrep) after starting the server. """ return SearchService(ctx).refresh_search_tools()
- Core helper method in SearchService that implements the refresh logic: refreshes available search strategies in project settings and returns a status message with available and preferred tools.def refresh_search_tools(self) -> str: """Refresh the available search tools.""" if not self.settings: raise ValueError("Settings not available") self.settings.refresh_available_strategies() config = self.settings.get_search_tools_config() available = config['available_tools'] preferred = config['preferred_tool'] return f"Search tools refreshed. Available: {available}. Preferred: {preferred}."