edit_org_doc
Change part of a document, leaving the rest untouched. Refuses rather than guessing: if the text you are replacing is missing, appears more than once without replace_all, the edit would remove the frontmatter block or leave it unparseable, or the document moved since expected_commit, nothing is written and you are told what is there now. If another writer commits between this call's read and its write, the edit is REFUSED rather than applied on top of theirs — re-read and re-apply. The confirmation carries a console link to the document you changed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node | No | the document's id, as returned beside its location — survives a rename or a move, so a citation written into a stored document keeps pointing at the right thing. Give this OR location, never both. | |
| share | No | the share id, when this location was shared with you from another workspace — list_org_folders prints it. Omit for your own folders. | |
| token | No | Bearer token identifying the principal. Usually omitted — supplied by the transport (HTTP Authorization header or the server's AGENTLEFS_TOKEN env). Only pass this to override. | |
| location | No | full path from the workspace root, e.g. "handbook/vendor/acme.md". Give this OR node. A path is what a person reads; a node is what survives somebody reorganizing. | |
| new_string | Yes | what to put in its place | |
| old_string | Yes | exact text to replace — must appear in the current body | |
| replace_all | No | replace every occurrence (default: refuse if more than one) | |
| expected_commit | No | the document head you read at (read_org_doc prints it). Refuses if that document has moved since. |