Skip to main content
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.

Parameters

documentId
string
required
ID of the document to patch.
operations
array<object>
required
Array of patch operations to apply in order.