vault_write
Write to your Obsidian vault: append or replace project sections, or create new files with auto-generated frontmatter.
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
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Relative path for the file. Setting this with no section creates the file (create mode). | |
| commit | No | If 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. | |
| content | Yes | Markdown content to write (body only for create mode). | |
| project | Yes | Project slug or '_meta' for cross-project content. | |
| section | No | Section shortcut (context, tasks, roadmap, lessons). For append/replace. | |
| doc_type | No | Document type for frontmatter (create mode). Optional; defaults to "note". | |
| operation | No | 'append', 'replace', or 'create'. Default 'append'. 'create' is inferred when path is set and section is empty. | append |
| idempotency_key | No | Optional 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
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |