Update Frontmatter
update_frontmatterMerge new key-value pairs into a note's YAML frontmatter, preserving existing keys and leaving the body untouched. Use to set status, tags, or other metadata.
Instructions
Merge new key-value pairs into a note's YAML frontmatter, preserving any keys not mentioned and leaving the body content untouched. Keys in the payload overwrite existing values. Creates a frontmatter block if the note has none. Returns a count of properties written. Use to set status fields, tags arrays, or other metadata without rewriting the body.
Note: The YAML block is regenerated on each update — comments, custom quoting, multi-line scalar style, blank lines, and key ordering inside the block are normalized. Key presence and values are preserved; formatting is not.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Relative path from vault root to the note (e.g., 'projects/alpha.md'). Extension optional. | |
| properties | Yes | JSON object string of frontmatter keys to set, e.g., '{"status":"done","priority":1,"tags":["review"]}'. Existing keys not in the payload are preserved. |