Create or update a note
upsert_noteCreate a note in Obsidian vault if missing, or fully replace its body and frontmatter if it exists. Supports merging frontmatter. Provides idempotent write operation.
Instructions
Create a note if missing, replace it if it exists. Body is always fully replaced. Frontmatter is replaced by default; pass merge_frontmatter: true to keep existing frontmatter keys not specified in this call. Use this when you want an idempotent write — neither create_note (errors on existence) nor update_note (errors when missing) handle that on their own.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Vault-relative path. '.md' is appended if missing. | |
| content | No | Markdown body. | |
| frontmatter | No | YAML frontmatter as a JSON object. | |
| links | No | Optional list of note titles to render as `[[wiki-links]]` at the end. | |
| merge_frontmatter | No | If true and the note already exists, merge new frontmatter keys on top of existing ones instead of replacing the block wholesale. Body is always replaced. |