search_notes
Find text or regex matches in Markdown notes across one or all vaults, with result limits and optional before/after context lines.
Instructions
Search .md note contents with ripgrep across one vault or all vaults. regex=True uses ripgrep's Rust syntax (Python re when ripgrep is absent), so lookarounds and backreferences are not portable. limit is clamped 1-200 and the response carries a truncated flag; before/after (0-10) add context lines. With context each hit keeps text (= match_line) plus before_lines/match_line/after_lines, otherwise only text.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | Context lines after each hit | |
| limit | No | Max matches (default 50) | |
| query | Yes | Search text (or regex with regex=True) | |
| regex | No | Treat query as a regular expression | |
| vault | No | Vault name; omit to search all | |
| before | No | Context lines before each hit | |
| case_sensitive | No | Case-sensitive matching |