Skip to main content

SearchToolsTool

Attributes
ClassVar
required
Name identifier
ClassVar
required
Parameter value
ClassVar
required
Parameter value

method init

Initialize with server manager and create a search tool.Parameters
required
Server name or configuration
Signature

ToolSearchEngine

method init

Initialize the tool search engine.Parameters
default:"None"
The ServerManager instance to get tools from
bool
default:"True"
Whether to cache query results
Signature

method index_tools

Index all tools from all servers for search.Parameters
dict[str, list[langchain_core.tools.base.BaseTool]]
required
dictionary mapping server names to their tools
Signature
Search for tools that match the query using semantic search.Parameters
str
required
The search query
int
default:"5"
Number of top results to return
Returns
list[tuple[langchain_core.tools.base.BaseTool, str, float]]
list of tuples containing (tool, server_name, score)
Signature

method search_tools

Search for tools across all MCP servers using semantic search.Parameters
str
required
The search query to find relevant tools
int
default:"100"
Number of top results to return
str
default:"None"
Name of the currently active server (for highlighting)
Returns
str
String with formatted search results
Signature

method start_indexing

Index the tools from the server manager.Signature

ToolSearchInput

Attributes
str
required
Query string or input
int
required
Integer value

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.Parameters
Any
required
Parameter value
Signature