Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • 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}."
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It mentions the tool is 'manually' triggered and 're-detect[s]' tools, implying it updates internal state without destructive effects, but lacks details on permissions, rate limits, or what happens if detection fails. It adds some behavioral context but not comprehensive coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core action and followed by a specific use case. Every sentence adds value without waste, making it efficient and well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 0 parameters, no annotations, and an output schema (which handles return values), the description is reasonably complete. It explains the purpose, usage, and context adequately, though it could benefit from more behavioral details like error handling or system impact.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so no parameter information is needed. The description appropriately focuses on usage and purpose without redundant parameter details, earning a baseline score of 4 for this context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('re-detect') and target resource ('available command-line search tools on the system'), distinguishing it from siblings like 'refresh_index' or 'configure_file_watcher'. It precisely explains what the tool does without being tautological.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use this tool: 'if you have installed a new tool (like ripgrep) after starting the server'. This provides clear context for usage versus alternatives, such as not using it for routine operations or when no new tools are installed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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