Read File
read_fileRead the text content of a Google Doc, Sheet, or Slides presentation. Docs export as plain text, Sheets as CSV, Slides as plain text. For large files, returns a size warning instead of content — use max_chars and offset to read in chunks.
file_id also accepts a ShareWatch handoff code of the form SW-XXXXXXXX. The user gets one by opening a file from Google Drive with ShareWatch, and it stands for that file until it goes unused for 30 days. The result always reports the real file_id, so use that value for any follow-up call rather than the code.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| offset | No | Character offset to start reading from. Use with max_chars to paginate through large files. | |
| file_id | Yes | The Google Drive file ID, or a ShareWatch handoff code like SW-7K2MPQ4B that the user was given when they opened a file from Drive | |
| max_chars | No | Maximum characters to return. Use this for large files to avoid consuming too much context. Omit to let the server decide (returns full content for small files or a size warning for large ones). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| links | No | ||
| offset | No | ||
| content | Yes | ||
| file_id | Yes | ||
| trashed | No | ||
| version | No | ||
| file_name | Yes | ||
| mime_type | Yes | ||
| truncated | No | ||
| sheet_tabs | No | ||
| total_chars | No | ||
| alternatives | No | ||
| partial_read | No | Why the content is less than the whole file, or absent entirely. Empty means a complete read. When set, do NOT paginate with offset unless the text says the rest is reachable that way |