ReferenceCore
Core operations
Primary read and write operations.
14 operations. Names, descriptions, and behavior flags come from the canonical contract.
Operations
clearContentClear all document body content, leaving a single empty paragraph.mutatesdeleteDelete content at a contiguous document selection. Accepts a SelectionTarget or mutation-ready ref. Supports cross-block deletion and optional block-edge expansion via behavior mode.mutatestrackedextractExtract all document content with stable IDs for RAG pipelines. Returns blocks with full text, comments, and tracked changes: each with an ID compatible with scrollToElement().readfindSearch the document for text or node matches using SDM/1 selectors. Returns discovery-grade results: for mutation targeting, use query.match instead.readgetRead the full document as an SDDocument structure.readgetHtmlExtract the document content as an HTML string.readgetMarkdownExtract the document content as a Markdown string.readgetNodeRetrieve a single node by target position.readgetNodeByIdRetrieve a single node by its unique ID.readgetTextExtract the plain-text content of the document.readinfoReturn document summary info including word, character, paragraph, heading, table, image, comment, tracked-change, SDT-field, list, and page counts, plus outline and capabilities.readinsertInsert content into the document. Two input shapes: text-based (value + type) inserts inline content at a SelectionTarget or ref position within an existing block; structural SDFragment (content) inserts one or more blocks as siblings relative to a BlockNodeAddress target. When target/ref is omitted, content appends at the end of the document. Text mode supports text (default), markdown, and html content types via the `type` field. Structural mode uses `placement` (before/after/insideStart/insideEnd) to position relative to the target block.mutatestrackedmarkdownToFragmentConvert a Markdown string into an SDM/1 structural fragment.readreplaceReplace content at a contiguous document selection. Text path accepts a SelectionTarget or ref plus replacement text. Structural path accepts a BlockNodeAddress (replaces whole block), SelectionTarget (expands to full covered block boundaries), or ref plus SDFragment content.mutatestracked