patch_content
Insert markdown content before, after, or in place of headings, blocks, or frontmatter in Obsidian files.
Instructions
Insert content relative to a heading, block, or frontmatter in a file. For heading targets, the value MUST be the full path of the heading: at least two non-empty segments separated by "::" (i.e., the H1::H2[::H3...] form). Top-level headings (no parent) are unreachable through this tool — use get_file_contents + put_content for those edits. Headings whose literal text contains "::" are also unreachable through this tool (the validator treats every "::" as a path separator and there is no escape syntax).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | When targetType is 'heading', the value MUST be a full path: at least two non-empty segments separated by '::'. Top-level headings and headings whose literal text contains '::' are unreachable through this tool. | |
| content | Yes | The markdown content to insert. | |
| vaultId | No | Optional vault ID (defaults to configured default vault). | |
| filepath | Yes | Path to the file (relative to vault root). | |
| operation | Yes | How to insert the content relative to the target. | |
| targetType | Yes | Type of target to locate. |