Vault Write
vault_writeWrite Markdown content to project vault files by appending or replacing a section, or creating a new file with 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. Requires path, relative to the project directory. Frontmatter is generated (doc_type defaults to "note") unless content opens with its own block, which is kept as is. Inferred automatically when you pass a path with no section, so operation may be omitted.
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": {
"project": "<project>",
"content": "<content>"
},
"name": "vault_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | File path relative to the project directory (e.g. 'sessions/x.md', not '10_projects/<project>/sessions/x.md'). 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. In create mode, either a body (frontmatter is generated) or a full document with frontmatter. | |
| 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 generated frontmatter (create mode). Optional; defaults to "note". Refused if it contradicts the type in content's own frontmatter. | |
| 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 |