patch_note
Edit a specific section of an Obsidian note by heading or block reference. Perform append, prepend, or replace operations on targeted content without altering the entire file or frontmatter.
Instructions
Surgically edit a section of a note — targeted by heading or block reference — without rewriting the whole file. Operations: append (add after section), prepend (add after heading line), replace (swap section content). Frontmatter is never touched.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Vault-relative path to the note. | |
| target | Yes | Exactly one of: { heading: "Section Title" } or { block: "block-id" } (without the ^ prefix). | |
| operation | Yes | append: insert after section content. prepend: insert after heading line. replace: swap section content. | |
| content | Yes | Content to insert or replace with. | |
| createIfMissing | No | If the heading target is not found, append a new heading (level 2) + content. Only valid for heading targets. Default false. |