> ## Documentation Index
> Fetch the complete documentation index at: https://docs.asteragents.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Docs Tools

> Read a Google Doc's structure and edit it in place through the Google Drive connection

## Tool surface

| Tool | Use it for |
| - | - |
| `google_docs_read` | A Doc's tabs, then every paragraph and table with its position, style and text, plus the revision to edit against. Optionally the comment threads. |
| `google_docs_update` | Changes to an existing Doc: insert, delete or replace text, headings and text styles, lists, tables, page breaks and images. |

Both use the existing **Google Drive** connection. Edits land in the same Doc,
so its link and sharing stay the same. To read a Doc's content without editing
it, `google_drive_read_file` returns shorter Markdown.

## How edits work

`google_docs_update` sends Google Docs API
[batchUpdate](https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/batchUpdate)
requests. They run in order, and either all apply or none do.

* **Read first.** Positions come from `google_docs_read`, and the update must
  name the `revision_id` it was planned against. If someone edited the Doc in
  between, Google rejects the whole batch instead of writing in the wrong
  place; the agent reads again and retries. A batch of only find-and-replace
  (`replaceAllText`) needs no revision.
* **Images from the conversation.** An image an agent made or received in the
  conversation (PNG, JPEG or GIF) can go into the Doc by its attachment path.
  Aster gives Google a link to it that expires after 10 minutes.
* **Large edits from a script.** An agent can write the requests to a file in
  its workspace and pass `requests_file` instead of typing them into the call.

## Limits and safety

Both tools follow the organization's
[Google Drive folder limit](https://docs.asteragents.com/integrations/google-drive). With a read-only
Drive connection, `google_docs_read` works and `google_docs_update` is refused
before anything is sent to Google. Neither tool deletes a Doc or changes its
sharing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.