patch_document
Surgically edit a document by applying block-level operations. Each operation targets a specific block by its blockId (use list_document_blocks to find IDs first). Operations: replace, insertBefore, insertAfter, delete. Applied in order; partial success possible. Markdown field uses the same extended syntax as write_document_markdown — see system prompt. Cross-references in the markdown you supply (“Section 2”) are linked automatically; blocks you did not touch are left alone. Deleting a clause that other text points at is reported as brokenClauseReferences — those references now read “Not found” and need the pointing text fixed.
Parameters
string
required
ID of the document to patch.
array<object>
required
Array of patch operations to apply in order.