Skip to main content
Glama

refresh_search_tools

Re-detect available command-line search tools on the system to ensure newly installed tools are recognized by the code-index-mcp server for efficient code indexing and analysis.

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

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "title": "refresh_search_toolsArguments", "type": "object" }

Implementation Reference

  • MCP tool handler for 'refresh_search_tools'. This is the entry point registered with FastMCP that executes the tool logic by delegating to SearchService.
    @mcp.tool() @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 implementation logic for refreshing search tools. Calls settings.refresh_available_strategies() and returns the updated configuration status.
    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}."

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