Home / Function/ make_tool_searcher() — anthropic-sdk-python Function Reference

make_tool_searcher() — anthropic-sdk-python Function Reference

Architecture documentation for the make_tool_searcher() function in tools_runner_search_tool.py from the anthropic-sdk-python codebase.

Entity Profile

Dependency Diagram

graph TD
  062634b0_7b8f_dd40_d7ec_abf487495482["make_tool_searcher()"]
  fb1a4163_0002_aa33_791c_d193be58f7a1["tools_runner_search_tool.py"]
  062634b0_7b8f_dd40_d7ec_abf487495482 -->|defined in| fb1a4163_0002_aa33_791c_d193be58f7a1
  5cdd6d40_f263_a4bd_dcef_6921cb4fa52f["main()"]
  5cdd6d40_f263_a4bd_dcef_6921cb4fa52f -->|calls| 062634b0_7b8f_dd40_d7ec_abf487495482
  style 062634b0_7b8f_dd40_d7ec_abf487495482 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

examples/tools_runner_search_tool.py lines 47–61

def make_tool_searcher(tools: List[BetaFunctionTool[Any]]) -> BetaFunctionTool[Any]:
    """Returns a tool that Claude can use to search through all available tools"""

    @beta_tool
    def search_available_tools(*, keyword: str) -> BetaFunctionToolResultType:
        """Search for useful tools using a query string"""

        results: list[BetaToolReferenceBlockParam] = []
        for tool in tools:
            if keyword in json.dumps(tool.to_dict()):
                results.append({"type": "tool_reference", "tool_name": tool.name})

        return results

    return search_available_tools

Subdomains

Called By

Frequently Asked Questions

What does make_tool_searcher() do?
make_tool_searcher() is a function in the anthropic-sdk-python codebase, defined in examples/tools_runner_search_tool.py.
Where is make_tool_searcher() defined?
make_tool_searcher() is defined in examples/tools_runner_search_tool.py at line 47.
What calls make_tool_searcher()?
make_tool_searcher() is called by 1 function(s): main.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free