View the source code for this module on GitHub: https://github.com/mcp-use/mcp-use/blob/main/libraries/python/mcp_use/agents/managers/tools/search_tools.py
SearchToolsTool
from mcp_use.agents.managers.tools.search_tools import SearchToolsTool
ToolSearchEngine
from mcp_use.agents.managers.tools.search_tools import ToolSearchEngine
method search
Search for tools that match the query using semantic search.ParametersReturnsstrrequiredThe search queryintdefault:"5"Number of top results to return
Signaturelist[tuple[langchain_core.tools.base.BaseTool, str, float]]list of tuples containing (tool, server_name, score)
def search(query: str, top_k: int = 5):
method search_tools
Search for tools across all MCP servers using semantic search.ParametersReturnsstrrequiredThe search query to find relevant toolsintdefault:"100"Number of top results to returnstrdefault:"None"Name of the currently active server (for highlighting)
SignaturestrString with formatted search results
def search_tools(query: str, top_k: int = 100, active_server: str = None):
ToolSearchInput
from mcp_use.agents.managers.tools.search_tools import ToolSearchInput
method init
Create a new model by parsing and validating input data from keyword arguments.Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.self is explicitly positional-only to allow self as a field name.ParametersSignatureAnyrequiredParameter value
def __init__(data: Any):