Read a note from the vault. `format: "content"` returns just the raw markdown body. `format: "full"` returns a structured object with content, frontmatter, tags, and file metadata. `format: "document-map"` returns the catalog of headings, block references, and frontmatter fields. `format: "section"` returns a single heading/block/frontmatter section (requires `section`); heading sections include the full subtree under that heading, including nested headings. Works against any vault path, the active file, or a periodic note.
List notes and subdirectories at a vault path. Defaults to vault root when `path` is omitted. Walks the directory tree up to `depth` levels (default 2 — top-level entries plus their immediate children, a structural overview; max 20). Pass `depth: 1` for a flat single-directory listing, or bump higher to walk deeper. Optional `extension` and `nameRegex` filters apply across the whole walk. Returns flat `entries[]` (each with `path`, `type`, optional `truncated`) plus a tree view in the rendered output. Capped at 1000 entries per call — when reached, walking stops and `excluded` is set; drill deeper by narrowing `path` to a subdirectory or applying filters.
List every tag found across the vault, with usage counts. Includes hierarchical parents — `work/tasks` contributes to both `work` and `work/tasks`.
Search the vault. Modes:
- `text`: substring match with context windows. Pass `query` as a string and optionally `pathPrefix` to filter the returned filenames.
- `dataview`: a Dataview DQL query (`TABLE …`). Pass `query` as the DQL string. Use this for path/date/metadata filters; `file.mtime`, `file.path`, etc. are queryable.
- `jsonlogic`: a JSONLogic tree evaluated over each note's NoteJson. Pass `logic` as a JSON object. Available `var` paths: `path` (string), `content` (string), `frontmatter.<key>` (any), `tags` (string[]), `stat.ctime` / `stat.mtime` / `stat.size` (number). Custom operators include `glob` and `regexp`.
Results are capped at 100 hits; an `excluded` indicator reports the overflow. Text-mode hits are additionally clipped to `maxMatchesPerHit` matches per file (default 10); when clipped, the hit carries `truncated: true` and `totalMatches`.
Create or overwrite a note. With `section` provided, replaces just that heading/block/frontmatter section in place; otherwise writes the whole file. Whole-file writes refuse to clobber an existing note unless `overwrite: true` is set — read the note first and prefer `obsidian_patch_note` / `obsidian_append_to_note` / `obsidian_replace_in_note` for in-place edits. For heading sections, `content` is the new body; the heading line itself is preserved automatically and a leading duplicate heading is stripped.
Append content to a note. Without `section`, the body is appended to the end of the file. With `section`, the content is appended to the end of that heading/block/frontmatter. For block-reference targets, the upstream concatenates `content` adjacent to the block line without inserting a separator — include a leading newline in `content` if you want one. Set `createTargetIfMissing` to bring the target section into existence rather than failing when it does not exist.
Surgical edit of a heading, block reference, or frontmatter field. Choose `operation: "append"` to add after the section, `"prepend"` to add before, or `"replace"` to swap it out. Use `obsidian_get_note` with `format: "document-map"` to discover available headings, blocks, and frontmatter fields. Nested headings need `Parent::Child` syntax.
String or regex search-replace inside a single note. The note is fetched, replacements are applied sequentially (each sees the previous one's output), and the result is written back. Use for edits that don't fit `obsidian_patch_note`'s structural targets — e.g., body-wide find-and-replace.
Atomic `get` / `set` / `delete` on a single frontmatter key. `set` requires `value` (any JSON-typed value: string, number, boolean, array, or object).
Add, remove, or list a note's tags. The server reconciles both representations — frontmatter `tags:` array and inline `#tag` syntax — so an `add` ensures the tag is present in the requested location(s), and a `remove` strips it. Inline `#tag` occurrences inside fenced code blocks are intentionally left alone. Inline-location additions append the new tag at the end of the file. `list` ignores the `tags` field.
Permanently delete a note from the vault. Confirms with the user before deleting when the client supports interactive confirmation. Recovery requires the local trash in Obsidian — there is no API-level undo.