The vault to search.
Search arguments. query is required and must be non-empty.
folder restricts the scan to a subdirectory (vault-relative).
limit caps results (default 25). mode defaults to "all".
A SearchResponse with sorted matches and a
scanned_notes observability count.
Substring-grep search over the vault: scans every
.mdbody for token occurrences inall/any/phrasemode and ranks by overlapping occurrence count. All query tokens share one failure-automaton body pass.This is the simplest retrieval primitive — no index, no embeddings, no native deps. Useful when the agent already knows specific keywords; for frequency-weighted exact-token ranking use semanticSearch. Conceptual recall requires the embedding signal available through searchHybrid. Read concurrency is bounded to 16 to avoid blowing the fd limit on large vaults. Tokenization is whitespace-split + lowercased; case-insensitive.