Docs Read Document
docs_read_documentRead a Google Docs document across all tabs as text, markdown, editing outline, or raw resource to summarize content or retrieve indices for batch updates.
Instructions
Read a Google Docs document, every tab in order: 'text' or 'markdown' to read or summarize it, 'outline' for the indices docs_batch_update_document (extended tool tier) needs, 'raw' for Google's Document resource unchanged. Every format returns document_id, title, url and revision_id (null unless the user can edit the document). Text and markdown add format, tabs and one page of body with truncated, next_offset, body_chars and body_sha256; outline adds tabs of content elements (kind, start_index, end_index, text, style) with truncated, next_offset, element_count, outline_chars and outline_sha256; page on with offset=next_offset until it is null. Raw returns the resource in document.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"document_id": "<document_id>"
},
"name": "docs_read_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Output form: 'text' returns clean readable text; 'markdown' the same content as Markdown (headings, lists, pipe tables, links, footnotes); both come in pages of about 8,000 characters. 'outline' returns the editing outline in pages of about 16,000 characters of JSON, cut only between structural elements: every element with the start_index and end_index docs_batch_update_document (extended tool tier) requests need, styles left out; an index inside an element's text counts UTF-16 units, so most emoji take two; a tab begun on an earlier page has continued true and no headers, footers, footnotes or named_ranges. 'raw' returns Google's Document resource unchanged and unpaged, every style and index included. The text differs from drive_read_file's Google export, so body_chars differ too. | text |
| offset | No | Where to resume: the next_offset of a truncated result, with the same format. For 'text' and 'markdown' a character offset into the rendered text; for 'outline' the number of structural elements already read, counted across tabs in order. 0 starts at the beginning; 'raw' ignores it. | |
| document_id | Yes | Google Docs document ID: the Drive file ID, also the long ID in the document's URL, from drive_list_files, search_workspace or docs_create_document. | |
| include_tabs_content | No | Read every tab, child tabs included, in every format (the default). When false Google returns only the first tab, so tabs then holds one entry whose tab_id and title are null. | |
| suggestions_view_mode | No | How pending suggested edits appear, in every format: SUGGESTIONS_INLINE marks them inline (text and markdown leave suggested insertions out), PREVIEW_SUGGESTIONS_ACCEPTED shows the text as if all were accepted, PREVIEW_WITHOUT_SUGGESTIONS as if all were rejected. Omitted or DEFAULT_FOR_CURRENT_ACCESS: inline for editors, without suggestions for viewers. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | ||
| body | No | ||
| tabs | No | ||
| title | No | ||
| format | No | ||
| document | No | ||
| truncated | No | ||
| body_chars | No | ||
| body_sha256 | No | ||
| document_id | No | ||
| next_offset | No | ||
| revision_id | No | ||
| element_count | No | ||
| outline_chars | No | ||
| outline_sha256 | No | ||
| suggestions_view_mode | No |