tools.search_tools module
Search the tool registry by keyword or semantic (vector) similarity.
Keyword mode performs a fast case-insensitive substring match over tool names
and descriptions. Semantic mode embeds the query with Gemini via
OpenRouterEmbeddings and runs a RediSearch KNN query against the
pre-computed tool embedding index, falling back to keyword search if the
index is unavailable.
- async tools.search_tools.run(query, mode, top_k=10, include_parameters=False, ctx=None, **_kwargs)
Search the tool registry and return matching tool definitions.
- Parameters:
- Return type:
- Returns:
JSON string with
success,mode,fallback,query,result_count, andresultsfields.