search
Find relevant passages in indexed local documents using hybrid, keyword, or semantic search, with optional folder and file type filters.
Instructions
Search all indexed documents and return the most relevant passages.
Use this first whenever the user asks about the content of their local
documents. query is free text; full questions work well in hybrid/
semantic mode, plain keywords in keyword mode. top_k (1-50) caps
results. folder restricts to one registered folder (pass its path as
shown by list_folders); file_type restricts by extension (e.g. "md").
mode: "hybrid" (default — keyword + semantic fused with reciprocal-
rank fusion, best for most queries), "keyword" (exact-term BM25, best
for identifiers or rare exact words), or "semantic" (meaning-based,
best when wording differs from the documents).
Returns {ok, results: [{chunk_id, path, file_type, location, score,
snippet}, ...], mode_used, note}. location is a heading path like
"Setup > Windows" (or a page for PDFs), usable for citations. score
is normalized 0-1 within this result set. A non-null note means the
requested mode degraded (e.g. embeddings unavailable) and explains why.
Snippets highlight keyword matches with bold; read_file on a
result's path gets the full context.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | hybrid | |
| query | Yes | ||
| top_k | No | ||
| folder | No | ||
| file_type | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||