Search Vault
searchFind documents in a Markdown vault by exact keywords, semantic meaning, or a combined hybrid approach.
Instructions
Find documents matching a query using full-text or semantic search.
Search the vault. Omit 'mode' for the best mode this vault can serve — hybrid when embeddings are configured, keyword when they are not. Pass mode="keyword" for exact terms, operators, or filenames, where FTS5/BM25 beats fusion. 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. Omit it (the default) to follow the vault's configured DEFAULT_SEARCH_MODE, which ships as "auto": hybrid where embeddings exist, keyword otherwise. Any configured default degrades to "keyword" when it needs embeddings the vault lacks; an explicit "semantic"/"hybrid" still errors when unconfigured. | |
| 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. On an OKF bundle three keys carry OKF semantics: status ("draft"/ "stable"/"deprecated"; "stable" also matches notes without a status field), stale ("true"/"false" — stale_after reached), and trust_tier ("unverified"/"machine-confirmed"/ "human-reviewed"); "type" filters normally, e.g. {"type": "Playbook", "stale": "false"}. | |
| 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 | Wait for recent index writes. On timeout, answer from the current index with _meta.index_stale=true. Default false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |