Search Vault
searchFind documents in a markdown vault using keyword, semantic, or hybrid search. Filter by folder and frontmatter fields, and get result snippets.
Instructions
Find documents matching a query using full-text or semantic search.
Search the vault. Default mode is "keyword" (FTS5/BM25). Pass mode="hybrid" when 'stats' shows semantic_search_available=True — hybrid fuses keyword and vector results for best quality. Use mode="semantic" for pure vector similarity.
The 'content' field in each result is a snippet by default, not the full document. Use read(path, section=heading) to retrieve the full text of a specific section.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | "keyword" uses FTS5/BM25 for exact terms. "semantic" uses vector similarity (requires embeddings). "hybrid" fuses both via reciprocal rank fusion — best quality when available. | keyword |
| limit | No | Maximum results to return (default 10). | |
| query | Yes | Natural language or keyword query string. | |
| folder | No | Restrict to documents under this folder path (e.g. "Journal"). Must match a value from 'list_folders'. Use folder="" for root-level (top-level) documents only. | |
| filters | No | Filter by indexed frontmatter field values, e.g. {"cluster": "craft", "tags": "pacing"}. Only fields listed in indexed_frontmatter_fields (see 'stats') can be filtered. Multiple filters are ANDed. For list fields (e.g. tags), this checks membership — {"tags": "pacing"} matches any document where "pacing" appears in the tags list. | |
| snippet_words | No | Width of the snippet window in words. Omit to use the server default. Set to 0 to return full chunk content. Use read(path, section=heading) for full section recovery. | |
| chunks_per_file | No | Maximum number of sections to return per file (default 2). Set to 1 to get only the top-ranked section per file. Must be >= 1. | |
| wait_for_pending_writes | No | When True, wait until your recent write/edit/delete/rename operations have been applied to the index before answering, so the results reflect those changes. Use it right after modifying notes when this read must see them (e.g. right after a write/edit/delete/rename whose effect this read should reflect). Default False answers immediately from the current index — almost always already up to date; inspect the response's ``_meta.index_stale`` field to tell whether a write was still in flight. Bounded by a server timeout (default 60s); on timeout it answers from the current index rather than waiting longer. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |