Write Note
vault_write_noteCreate a markdown note. Errors if a note already exists at the path unless overwrite is set. Body replaces the entire note content: existing content will be lost unless you include it in body, so do not use this tool for surgical edits to…
Instructions
Create a markdown note. Errors if a note already exists at the path unless overwrite is set. Body replaces the entire note content: existing content will be lost unless you include it in body, so do not use this tool for surgical edits to large files. Properties merge with any existing properties when overwriting (new keys added, matching keys overwritten, keys set to null removed, unmentioned keys preserved); overwriting without properties keeps the existing property values. A new note leaves out keys set to null.
Example: vault_write_note({ path: "Projects/notes.md", body: "# Notes\n\nProject notes here.", properties: { tags: ["project"], type: "project" } }) Example: vault_write_note({ path: "Projects/notes.md", body: "Updated content.", overwrite: true })
When to use: Creating a new note. Set overwrite: true only when you intend to replace an existing note's body. Prefer vault_update_properties for property-only edits (no body round-trip). Prefer vault_update_memory for appending dated entries to About Me/ memory files.
Errors:
"note already exists" — set overwrite: true to replace it, or use vault_patch_note or vault_replace_in_note for partial edits
"path must end in …" — add the .md extension
"cannot write note …: that path is not a file" — a folder already has this name; choose another path
"absolute path blocked" / "path traversal blocked" / "hidden path blocked" — use a vault-relative path with no hidden (dot-prefixed) file or folder in it
"concurrent write in progress" — another write to this note is in flight; re-read the note and retry
"body contains a control character" — body includes a non-printable control byte; remove it before writing
"properties block …" — with overwrite: true, the note's properties block can't be read, or a rewrite would lose it; the error says how to repair it
"the note would open with a properties block the server cannot keep …" — the note would get no properties (none passed or kept from an overwritten note, or every key set to null), and the body opens with --- lines around text that is invalid YAML, a list, a single value, or a YAML tag, which would become its properties block; pass at least one property, or start the body without --- lines
Obsidian syntax: Body is Obsidian Flavored Markdown (no escaping applied). Watch for: #word = tag (escape with #), [[ = wikilink, %% = comment block. In properties: quote wikilink values ("[[Note]]"), use YAML lists for tags, keep property types consistent (string/number/list mismatches cause silent query failures).
Returns: "Wrote ".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Markdown body content — do not include frontmatter fences (---); use the properties parameter instead. | |
| path | Yes | Vault-relative path including the ".md" extension (e.g. "Projects/notes.md"). Parent folders are created as needed. Use the exact letter case; a different case can create a duplicate note or folder. | |
| overwrite | No | Allow overwriting an existing note (default: false). | |
| properties | No | Properties to merge. |