Skip to main content
Glama
Vault Cortex Obsidian MCP Server

Vault Cortex Obsidian MCP Server

Write Note

vault_write_note
Destructive

Create a new markdown note or replace an existing note's body with overwrite set to true. Properties merge with existing keys, so notes can be created or fully rewritten in one call.

Instructions

Create a markdown note, or with overwrite: true replace an existing note's body.

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, or replacing a whole note's body. Prefer vault_patch_note or vault_replace_in_note to change part of a note. 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. For a non-markdown file (.canvas, .base, .json), use vault_write_file.

Behavior:

  • 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.

Errors:

  • "note already exists" — set overwrite: true to replace it

  • 'path must end in ".md"' — add the extension to a note's path; write other files (.canvas, .base, .json) with vault_write_file

  • "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" — pass a vault-relative path with no dot-prefixed part

  • "concurrent write in progress" — a write to this note is in flight; re-read it and retry

  • "body contains a control character" — remove the character the message names

  • "ENAMETOOLONG: …" or another filesystem error — the message says what to do

  • "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 …" — a note without properties would start with --- lines around text that can't be properties; the error says how to avoid it

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 ".

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>",
      "body": "<body>"
    },
    "name": "vault_write_note"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesMarkdown body content — do not include a properties block (the --- lines); use the properties parameter instead.
pathYesVault-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.
overwriteNoAllow overwriting an existing note (default: false).
propertiesNoThe note's properties.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.56.3
    • changedInput schema / properties / body / description
      Previous value: -"Markdown body content — do not include frontmatter fences (---); use the properties parameter instead."New value: +"Markdown body content — do not include a properties block (the --- lines); use the properties parameter instead."
    • changedInput schema / properties / properties / description
      Previous value: -"Properties to merge."New value: +"The note's properties."
  2. Changed1 schema field changedv0.54.16
    • addedInput schema / additionalProperties
      Added value: +false
  3. Changed2 schema fields changedv0.54.13
    • changedInput schema / properties / overwrite / description
      Previous value: -"Allow overwriting an existing note (default: false — errors if file exists)."New value: +"Allow overwriting an existing note (default: false)."
    • changedInput schema / properties / properties / description
      Previous value: -"Optional properties to merge; a null value deletes that key."New value: +"Properties to merge."
  4. Changed1 schema field changedv0.54.9
    • changedInput schema / properties / properties / description
      Previous value: -"Optional properties to merge. New keys are added; existing keys with matching names are overwritten; a null value deletes that key; unmentioned keys are preserved from the existing file."New value: +"Optional properties to merge; a null value deletes that key."
  5. Changed1 schema field changedv0.54.7
    • changedInput schema / properties / path / description
      Previous value: -"Vault-relative path including the \".md\" extension (e.g. \"Projects/notes.md\"). Parent folders are created as needed."New value: +"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."
  6. Changed1 schema field changedv0.50.0
    • addedInput schema / properties / overwrite / default
      Added value: +false
  7. Addedv0.32.1
  8. Removedv0.32.0
  9. Changed1 schema field changedv0.27.2
    • addedInput schema / properties / overwrite
      Added value: +{
      +  "description": "Allow overwriting an existing note (default: false — errors if file exists).",
      +  "type": "boolean"
      +}
  10. Changed1 schema field changedv0.23.10
    • changedInput schema / properties / path / description
      Previous value: -"Vault-relative path (e.g. \"Projects/notes.md\"). Parent folders are created as needed."New value: +"Vault-relative path including the \".md\" extension (e.g. \"Projects/notes.md\"). Parent folders are created as needed."
  11. Changed2 schema fields changedv0.23.5
    • changedInput schema / properties / body / description
      Previous value: -"Markdown body content (no frontmatter fences)"New value: +"Markdown body content — do not include frontmatter fences (---); use the properties parameter instead."
    • changedInput schema / properties / path / description
      Previous value: -"Vault-relative path for the note"New value: +"Vault-relative path (e.g. \"Projects/notes.md\"). Parent folders are created as needed."
  12. Changed1 schema field changedv0.15.23
    • changedInput schema / properties / properties / description
      Previous value: -"Optional properties to merge. New keys are added; existing keys with matching names are overwritten; unmentioned keys are preserved from the existing file."New value: +"Optional properties to merge. New keys are added; existing keys with matching names are overwritten; a null value deletes that key; unmentioned keys are preserved from the existing file."
  13. Added

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true and idempotentHint=false, but the description goes well beyond them: it explains the property merge algorithm (add/overwrite/remove-on-null/preserve-unmentioned), that overwriting without properties keeps existing values, that new notes drop null keys, and it enumerates ten specific failure modes with remedies. The Obsidian syntax warnings (unescaped #, [[, %%) are real behavioral hazards not encoded in any structured field.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Strongly front-loaded: action first, examples second, routing third, then Behavior/Errors/Obsidian/Returns headers that make it skimmable. It is long, and a few error bullets are low-value filler ("ENAMETOOLONG … or another filesystem error — the message says what to do") or verbose phrasing around the properties-block errors, but almost every line carries actionable information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, yet the description closes the loop with "Returns: 'Wrote <path>'", so return shape is covered without one. For a destructive, non-idempotent write with nested `properties`, the merge rules, path constraints, conflict/retry guidance ("re-read it and retry"), and error catalog leave an agent with nothing material missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3 and the schema already documents path, body, and overwrite. The description still adds genuine semantics the schema does not: the precise merge/removal behavior of the `properties` object (null removes a key, unmentioned keys persist) and the requirement to quote wikilinks and use YAML lists to avoid silent query failures. It falls short of 5 only because path casing and the no-properties-block-in-body rule are largely restated from the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource and immediately carves out the overwrite variant ("Create a markdown note, or with overwrite: true replace an existing note's body"). The two inline examples make the create-vs-replace distinction concrete, so an agent can distinguish it from vault_patch_note, vault_write_file, and vault_update_properties without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is an explicit "When to use" block plus four named alternatives with the exact condition that selects each (part-of-note edits → patch/replace_in_note, property-only → update_properties, dated memory entries → update_memory, non-markdown → write_file). Exclusions and alternatives are both stated, which is the top of this dimension.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.