patch_frontmatter_tool
Update YAML frontmatter keys in Obsidian notes without altering the note body. Apply updates to one or multiple notes, preview changes with dry run, and merge or replace list values.
Instructions
Update specific YAML frontmatter keys without touching the note body.
Pass path for one note, or paths to apply the same updates to
several notes in one call — exactly one of the two.
merge_arrays=True merges list values (e.g. tags); False replaces them. dry_run=True previews data {preview, diff, updated_keys} without writing — check it, then call again with dry_run=False.
With path: data carries {updated_keys, diff} and the envelope a
revision. With paths: one note failing doesn't abort the rest — this
returns the batch envelope, with data.results holding one item per note
({success, path, revision} or {success: false, path, error}) and
data.summary the {total, succeeded, failed} tally. Always check
data.summary.failed. expected_revision pins a single note's bytes and so
can't be combined with paths.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| paths | No | ||
| vault | No | ||
| dry_run | No | ||
| updates | No | ||
| merge_arrays | No | ||
| expected_revision | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||