read_document
Read a .docx and return its HTML representation, paginated. Every edit anchor must be HTML copied verbatim from this tool or from search_document, so see the exact markup of a spot before you edit it.
WHICH TOOL FIRST — USE YOUR JUDGEMENT, DON'T DEFAULT TO READING EVERYTHING:
You already know WHAT text to change (a name, a date, a clause, a row, a placeholder)? Start with search_document. It returns each matching spot as a COMPLETE block — verbatim markup you can paste straight into edit_document as
old— plus the page it is on, so you usually never need to read that page at all. On a long document this is far faster and cheaper than paging through it.You need the SHAPE of the document (what sections exist, how a table is laid out, where a new paragraph belongs, or the request is vague like "tighten this up")? Read pages here. Start with the default span and page forward only as far as the task needs.
Short document, or you need all of it? One read is fine. Both tools return the SAME HTML, so an anchor from either one is equally valid.
PAGINATION: the response covers a contiguous RANGE of logical pages. By default the range
starts at page 1 and returns a small span (also capped by a per-call token budget) — so a
short document comes back whole. The LAST LINE of what you get back always states the range,
e.g. "Pages 3-7 of 42 returned; 35 pages remain." — read it, and you always know where you
are and how much you have not seen. (The same numbers travel as start_page, end_page,
total_pages, total_tokens and has_more.) Pass start_page to start at a later page and
end_page to widen or cap the range — a wide end_page is still bounded by the per-call token
budget, so on a large document has_more stays true and you keep calling with
start_page=end_page+1 until it is false.
Anchors copied from any page match the whole document, so you can edit straight from a page.
Don't re-read a page you have already been given, and don't page through a document hunting
for a string — search for it.
Tracked changes already in the document render as (insertions) and (deletions)
elements, each with a data-author. Use them to see which changes exist and who made them
before you accept, reject, or modify one (see edit_document).
Comments render as around the commented text, and each comment thread appears once as an
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_page | No | 1-based last page to return; omit for a span from start_page. | |
| start_page | No | 1-based first page to return. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||