notes_update
Update a note's fields by ID. Preserves omitted fields; an optional expected hash prevents overwriting concurrent edits.
Instructions
Update a note's fields by id (title, description, body, project, tags). Omitted fields are untouched; the slug and id stay stable. body replaces the WHOLE body, so pass expect_hash (notes_read returns it) to have the write refused rather than silently overwriting an edit that landed after you read the note -- and use notes_append when you only mean to add to it. Tags come in three flavors: tags replaces the whole set, while tags_add and tags_remove edit it in place; prefer add/remove, since a replace discards whatever another agent tagged in between and tags_remove is the only way to clear a tag at all.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | note id (ULID) | |
| body | No | new body, replacing the whole body (aliases: content, text) | |
| tags | No | tags, replacing all (a comma-separated string is also accepted); an empty list is read as absent and leaves the tags untouched -- to drop a tag use tags_remove | |
| title | No | new title | |
| project | No | new project slug ("" or "global" = global scope) | |
| tags_add | No | tags to add, leaving the rest in place; a tag already on the note is not duplicated. Applied after tags. | |
| description | No | new description | |
| expect_hash | No | optional precondition: the content_hash you last read for this item (memory_read/notes_read return it). The write is refused if the stored file has changed since -- another agent or the owner edited it -- so re-read and re-apply your change instead of overwriting theirs. Omit it to write unconditionally. | |
| tags_remove | No | tags to drop, matched exactly; a tag the note does not carry is ignored. Applied last, so it also removes what tags/tags_add just set. |