Skip to main content
read_document_text Read a document as plain text: a HERO editor document (with its clause numbering and headings), a PDF (the server extracts its text; it is the only way to read one), or a file attached to this chat message (attachmentFilename). Pass section to read one clause and what sits under it instead of the whole document. Returns at most 40000 characters per call with a page object ({offset, returned, total, nextOffset?}). Paged: when the result’s page.nextOffset is present, more remains — pass page.nextOffset as offset to continue.

Parameters

string
The document ID. Falls back to context documentId if omitted.
string
A clause number, e.g. “2.2” or “22”, to read just that clause.
string
Filename of a file attached to this chat message, to page through its text.
integer
Character to start at. Pass the previous result’s page.nextOffset. Minimum: 0.
integer
Max characters to return (default and max 40000). Minimum: 1. Maximum: 40000.
integer
Deprecated alias for limit. Minimum: 1.