obsidian_search
Search an Obsidian vault by words, phrases, or regex to find existing notes and sections before creating new documentation. Returns note, heading, line, snippet, and superseded status.
Instructions
Search the vault. Plain words are looked up in a full text index of note sections (split at ## and ### headings) and ranked by relevance: every word is required, a "quoted phrase" is kept together, and note titles, paths and headings count; frontmatter is not searched. Each result gives the note, the section heading, the line, a snippet, and 'superseded: YYYY-MM-DD' for a section marked superseded, which is ranked after live ones. A regular expression or a case-sensitive query scans whole files in path order instead. Use before creating new notes to find existing relevant documentation.
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": "obsidian_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Words to find, or a Python regular expression when regex is true | |
| regex | No | Treat the query as a regular expression and scan the files (default: false) | |
| folder | No | Optional: limit to this folder | |
| max_results | No | Maximum results to return (default: 10) | |
| case_sensitive | No | Match case exactly, scanning the files for the literal text (default: false) |