vault_write
Write content to a project vault: append or replace sections, or create new files with auto-generated frontmatter. Supports multi-mode updates for Obsidian-based knowledge management.
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 and doc_type.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | Yes | Project slug or '_meta' for cross-project content. | |
| content | Yes | Markdown content to write (body only for create mode). | |
| operation | No | 'append', 'replace', or 'create'. Default 'append'. | append |
| section | No | Section shortcut (context, tasks, roadmap, lessons). For append/replace. | |
| path | No | Relative path for new file. For create mode. | |
| doc_type | No | Document type for frontmatter. For create mode. | |
| commit | No | If True (default), auto-commit to git. If False, write to disk but leave the file dirty so the caller can batch many writes into one commit via the ``vault_commit`` tool, or let obsidian-git's auto-commit pick it up. Durability contract: files are persisted to disk regardless; only the *commit* is deferred. A crash before the next flush loses the commit, not the file content. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |