ToolRouter
getFilteredTools()- Get tools based on current strategysearchTools(query, topK?, options?)- Search via BM25 + embeddings, optionally scoped by exactserverIdor fragment-basedserverNamesearchToolsRegex(pattern, topK?)- Search via regex patternlistServers(options?)- List connected indexed servers with tool countslistTools(options?)- Deterministically list indexed tools, optionally scoped by server and paginated withcursorrefresh()- Re-index tools from all connected clientssetStrategy(strategy)- Change tool selection strategy at runtime
AIAdapter:
ToolIndex
Lightweight in-memory search index used internally by ToolRouter, or directly for specific custom discovery flows.
SchemaCompressor
Utility for yielding compact tool representations (name + description + inline parameterHint) without the full inputSchema.

