Search a folder by meaning
search_folderFind the passages in a folder of documents or code that best match a query by meaning and keyword, running locally. The first search indexes the folder; later searches reuse that index.
Instructions
Find the passages in a folder of documents or code (PDF, txt, md, source code, json, yaml, html, ...) that best match a query, by meaning as well as by keyword. Runs locally. The first search of a folder indexes it, which takes seconds to minutes depending on its size; later searches reuse the index until files change, and a folder inside an indexed one uses that index. Build output, dependencies and hidden folders are skipped. A folder with more than 10,000 documents is refused with its largest subfolders, to search one of those instead. Returns the passages best first, each with its file, its page for a PDF, and score. PDFs are read from their text layer; scanned PDFs without one are skipped. For photos use search_images; to order passages you already have, use rerank.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"query": "<query>"
},
"name": "search_folder"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | hybrid (default) combines meaning and keywords; semantic is meaning only; keyword is BM25 only. | |
| path | Yes | Absolute path of the folder to search, subfolders included. | |
| query | Yes | What to find, in natural language or keywords. | |
| top_k | No | How many passages to return. Default 5. | |
| rerank | No | Reorder results with a cross-encoder for better precision. Slower. Default false. |