Replace note
write_noteReplace the whole content of an existing note. Obsidian Sync only syncs .md, .canvas and .base files here, so other extensions such as .txt fail. Fails if the note doesn't exist; use create_note for new notes. Prefer patch_note for partial changes. Pass expected_sha256 from read_note's hash, or from a previous write's sha256, to fail instead of overwriting a change made meanwhile. Returns once Obsidian Sync has the note, or after about 35s with status upload_pending. A repeat write within 10 to 30s of the note's last upload returns at once with status waiting_for_upload; it still uploads.
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": {
"path": "<path>",
"content": "<content>"
},
"name": "write_note"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | vault-relative path of an existing note, as returned by list_files or search_notes, or an obsidian:// URL for a file in this vault | |
| content | Yes | full new content of the note; may be empty | |
| expected_sha256 | No | SHA-256 of the content you last saw: the hash read_note returns (with or without its sha256: prefix) or a previous write's sha256. The write fails if the note differs |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | vault-relative path of the note | |
| bytes | Yes | size of the note's content in bytes | |
| sha256 | Yes | SHA-256 of the note's content; pass it as expected_sha256 to the next write_note | |
| status | Yes | uploaded: Obsidian Sync has the note. waiting_for_upload: the note is saved, and Obsidian Sync uploads it within 30s, because it holds back a note's next upload for 10 to 30s after the last one. upload_pending: the note is saved, but its upload wasn't confirmed within 35s, or an earlier write of the note is still queued, for example because the server is reconnecting to Obsidian Sync; it uploads once the connection is back | |
| changed | Yes | false when the note already held this content, so nothing was written | |
| uploaded | Yes | whether Obsidian Sync has the note; if false it is saved and still queued for upload, as status explains |