Get document structure
get_documentRetrieve the complete raw Google Docs structure, including element indexes, styles, tables, and headers, to provide the exact map for range-based edits.
Instructions
Returns the raw Docs API document: title, documentId, revisionId, per-tab body with every structural element's startIndex/endIndex, textRun styles, tables, lists, inlineObjects (image ids for replace_image), headers/footers (their segment ids) and named styles. This is the exact index map that range tools consume, but it is VERBOSE — for reading content prefer read_document_text, which returns compact blocks with the same indexes. include_tabs_content=true (default) populates all tabs; suggestions_view_mode controls how unresolved suggestions render (default DEFAULT_FOR_CURRENT_ACCESS).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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. | |
| include_tabs_content | No | Populate every tab's content (default true). false = first-tab legacy shape. | |
| suggestions_view_mode | No | How unresolved suggested edits render in the returned content. |