write_note
Create or atomically overwrite a note in a vault, using a SHA-256 check to prevent overwriting changed content. Refreshes frontmatter date if present.
Instructions
Create or atomically overwrite a note (vault-root-relative path). Pass sha256 from a prior read/write as expected_sha256 to prevent overwriting a changed note. Refreshes the frontmatter updated: date (inserted when a frontmatter block exists without one); notes without a frontmatter block stay that way.
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": {
"vault": "<vault>",
"path": "<path>",
"content": "<content>"
},
"name": "write_note"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Vault-root-relative note path | |
| vault | Yes | Vault name | |
| content | Yes | Full new note content | |
| expected_sha256 | No | SHA-256 from a prior read/write; rejects stale writes |