Skip to main content
Glama

vault_write

Append to, replace a section of, or create project notes in an Obsidian vault, with optional immediate commit and retry-safe writes.

Instructions

Write to the vault: append, replace a section, or create a new file.

Modes:

  • append/replace: Update a project section. Requires section.

  • create: Create a new file with auto-generated frontmatter. Requires path; doc_type defaults to "note". Inferred automatically when you pass a path with no section, so operation may be omitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoRelative path for the file. Setting this with no section creates the file (create mode).
commitNoIf True, commit synchronously before returning — the escape hatch for a caller that needs the commit to exist by the time the call ends. Defaults to False, which queues the path for the reconciler to commit on its next tick (a few seconds). Durability contract: the file is persisted to disk regardless; only the *commit* is deferred, so a crash before the next flush loses the commit, not the content.
contentYesMarkdown content to write (body only for create mode).
projectYesProject slug or '_meta' for cross-project content.
sectionNoSection shortcut (context, tasks, roadmap, lessons). For append/replace.
doc_typeNoDocument type for frontmatter (create mode). Optional; defaults to "note".
operationNo'append', 'replace', or 'create'. Default 'append'. 'create' is inferred when path is set and section is empty.append
idempotency_keyNoOptional at-most-once token. If set, a retry with the same key is a no-op (safe for transparent retries after a daemon restart cuts an in-flight write — ADR-013). Empty (default) disables idempotency.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed2 schema fields changedv3.0.0
    • changedInput schema / properties / commit / default
      Previous value: -trueNew value: +false
    • changedInput schema / properties / commit / description
      Previous value: -"If True (default), auto-commit to git. If False, write to\ndisk but leave the file dirty so the caller can batch many\nwrites into one commit via the ``vault_commit`` tool, or let\nobsidian-git's auto-commit pick it up. Durability contract:\nfiles are persisted to disk regardless; only the *commit* is\ndeferred. A crash before the next flush loses the commit, not\nthe file content."New value: +"If True, commit synchronously before returning — the\nescape hatch for a caller that needs the commit to exist by\nthe time the call ends. Defaults to False, which queues the\npath for the reconciler to commit on its next tick (a few\nseconds). Durability contract: the file is persisted to disk\nregardless; only the *commit* is deferred, so a crash before\nthe next flush loses the commit, not the content."
  2. Changed3 schema fields changedv1.41.1
    • changedInput schema / properties / doc_type / description
      Previous value: -"Document type for frontmatter. For create mode."New value: +"Document type for frontmatter (create mode). Optional;\ndefaults to \"note\"."
    • changedInput schema / properties / operation / description
      Previous value: -"'append', 'replace', or 'create'. Default 'append'."New value: +"'append', 'replace', or 'create'. Default 'append'.\n'create' is inferred when path is set and section is empty."
    • changedInput schema / properties / path / description
      Previous value: -"Relative path for new file. For create mode."New value: +"Relative path for the file. Setting this with no section\ncreates the file (create mode)."
  3. Changed1 schema field changedv1.32.2
    • addedInput schema / properties / idempotency_key
      Added value: +{
      +  "default": "",
      +  "description": "Optional at-most-once token. If set, a retry with\nthe same key is a no-op (safe for transparent retries after a\ndaemon restart cuts an in-flight write — ADR-013). Empty\n(default) disables idempotency.",
      +  "type": "string"
      +}
  4. Addedv1.21.0
  5. Removedv1.13.0
  6. First observedv1.11.0

TDQS

A4.5/5.0
Behavior4/5

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

With annotations indicating a non-read-only, non-idempotent, non-destructive write, the description adds behavior: auto-generated frontmatter, doc_type defaulting to 'note', and automatic mode inference. It does not mention deferred commit, but that is disclosed in the schema, and the description's extra mode semantics exceed what annotations alone provide.

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

Conciseness5/5

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

Four short lines, bulleted modes, no filler. Every sentence earns its place.

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?

For an 8-param tool with rich schema and output schema, the description provides the necessary high-level behavioral map: modes, requirements, and default inference. It is complete enough for selection and correct invocation.

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. Description adds cross-parameter semantics: which modes require which params, that operation can be omitted when path has no section, and doc_type defaulting. This goes beyond individual schema entries.

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?

Description opens with 'Write to the vault' and lists three concrete modes: append, replace, and create a new file. This clearly identifies the resource and operation and distinguishes it from vault_list/vault_query/vault_search siblings.

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

Usage Guidelines4/5

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

Modes explicitly state requirements: append/replace requires a section, create requires a path, and operation is inferred when path is passed without section. It gives clear within-tool mode-selection context, though it does not name sibling alternatives or exclusions.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mlorentedev/hive'

If you have feedback or need assistance with the MCP directory API, please join our Discord server