anchor_create
Bookmark a passage in a .docx so edits that shift addresses don't lose it; stores quoted text, context, paragraph number, and fingerprint for later anchor.resolve.
Instructions
Make an anchor for a passage so it can be found again after edits shift or change addresses: the quoted text, context characters before and after (default 32, max 200), and the paragraph's number and fingerprint then. at is a range in one paragraph (p142#a7b2a7b2:10-15), a whole paragraph (p142#a7b2a7b2) or a sentence (p142#a7b2a7b2.s3). Use it to bookmark passages you will come back to; find them later with anchor.resolve (text.find searches for any text instead). Read-only; STALE_ADDRESS when at is outdated, SCHEMA_INVALID for a range across paragraphs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | Yes | Range inside one paragraph, e.g. p142#a7b2a7b2:10-15, or a whole paragraph or sentence (p142#a7b2a7b2.s3). | |
| doc | Yes | Path to the .docx file. | |
| context | No | Characters of prefix and of suffix to keep. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Always true on success. | |
| op | Yes | The operation that ran. | |
| api | Yes | API version (1.0). | |
| doc | No | The document read or written: path, sha256 and paragraph count. | |
| next | Yes | Cursor for the next page (pass as cursor), or null. | |
| result | Yes | What the operation returns. | |
| warnings | Yes | Things to know about the result. |