Search Notes
vault_searchSearch vault notes and files with hybrid keyword and semantic matching, then narrow results by folder, tags, type, properties, and dates. Use it to find relevant content even when exact keywords differ.
Instructions
Hybrid search across vault notes and the content of canvases, PDFs, HTML pages (.html/.htm, visible text only), scripts (.py/.sh/.ps1), and .txt/.csv/.json/.xml/.svg/.log/.yaml/.yml/.base files, ranked by combined keyword and semantic relevance. Semantic matching finds notes even when exact keywords differ — "career aspirations" finds notes about "goals" and "targets". Unquoted terms use implicit AND with stemming ("running" also matches "run"); wrap in double quotes for exact phrases; punctuated terms (vault-cortex, deploy/local) are matched as exact adjacent-word phrases; *, ^, parentheses and colons instead split a term into separate words.
Filters — all conditions AND-combine with each other and the text query; any filter but folder returns notes only:
folder: a whole folder, subfolders included: "Projects" covers "Projects/Archive" but not "ProjectsOld/", ignoring ASCII letter case
tags: every listed tag must match, in the tags property or as a #tag in the body, in any letter case; "project" also matches "project/a"
type: the type property, matched exactly, letter case included
related: every listed link must appear in the related property, written as it is there, brackets and alias included
properties: keys and text values match exactly, letter case included; values compare by exact type — pass a number as a number, not "4". Exception: true and false compare as 1 and 0, so true or 1 matches a checked checkbox and the number 1. A list property matches when any element equals the value.
created / modified: bounds compare whole calendar days in the server's time zone (returned created and modified values show its UTC offset). A note whose created property is missing or not an ISO date never matches a created filter
Example: vault_search({ query: "how the server watches for file changes" }) Example: vault_search({ query: "kubernetes networking", filters: { tags: ["reference"] } }) Example: vault_search({ query: "meeting notes", filters: { type: "meeting", folder: "Work" } }) Example: vault_search({ query: "decision", filters: { modified: { after: "2026-06-30" } } }) — matching notes touched in July or later
When to use: The primary discovery tool for content-based queries, optionally constrained by metadata. Prefer vault_search_by_tag for tag-only queries without text. Prefer vault_search_by_folder for browsing a folder. Prefer vault_search_by_property for metadata-only queries. Prefer vault_recent_notes for time-based browsing.
Behavior: Results can lag a file change by a few seconds. No matches returns an empty results array with total 0, not an error. With search_mode "fts", at most 100 notes and 100 files come back; with "hybrid", at most 200 notes and 200 files. Files contribute their first 100 KiB of text; PDFs also stop after 500 pages. PDFs over 52428800 bytes or whose text extraction fails are found by name only; PDF content becomes searchable after startup. An HTML page or script over 16 MiB is found by its name only; scripts match by keyword only.
Malformed query syntax never throws: the uppercase words AND, OR and NOT (searched as terms in other spellings or inside double quotes), and punctuation such as *, ^, parentheses and colons, are dropped before keyword matching; a query left with no terms is matched by meaning only, or finds nothing when search_mode is "fts".
Errors:
"invalid created.on date: …" or "… is not a calendar date" (any created/modified bound) — pass a real calendar date in YYYY-MM-DD form
"tag must not be empty …" — a tags entry is only "#"; pass the tag name
"[SqliteError]: …" / "[IndexIntegrityError]: …" — the index failed, not the call; the message says what to do
Returns: JSON with results array (path, title, snippet, score, tags (the tags property; vault_update_properties edits it), body_tags (#tags in the note's text, one per spelling; vault_replace_in_note edits them; absent when none), folder (a note's top-level folder; a file's full parent folder), type, kind, extension, created, modified, bytes), total (results returned, not all matches), search_mode ("hybrid" when vector embeddings contributed, "fts" when only keyword matching ran), and reranked (true when a second ranking pass reordered the results). A higher score is more relevant. kind is "note" or, for non-markdown content, "file", which also carries extension (e.g. ".pdf"). created is omitted, not null, when a result has none; type is null when the result has no type property; bytes is the on-disk size. With include_leading_callout, each result also carries leading_callout (the opening callout, { type, title, body }) when present.
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": {
"query": "<query>"
},
"name": "vault_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max results (default 20) | |
| query | Yes | Search query text | |
| filters | No | Optional structured filters | |
| snippet_tokens | No | Snippet length in words, not model tokens (default 30) | |
| include_leading_callout | No | If true, include each result's leading callout. |