Read document as text
read_document_textFetch a Google Doc's text as structured blocks with paragraph text, indexes, styles, bullets, and tables. Read before edits to get accurate positions, as indexes shift after mutations.
Instructions
Returns the document as compact readable blocks, per tab: each paragraph with its text, start/end indexes (UTF-16 code units — the coordinates insert_text/replace_range/delete_range/style tools take), named style (headings) and bullet flag; tables come as cells[row][column] plain text with the table's range. Inline images appear as [image:] placeholders (the id feeds replace_image). tab_id limits the output to one tab. Call this before any range edit — every insert/delete shifts later indexes, so indexes from before a mutation are stale.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tab_id | No | Tab to target (from list_tabs). Omit for the first/only tab. | |
| document_id | Yes | The document id — the long id from the document URL (docs.google.com/document/d/<documentId>/edit) or from create_document output. |