Drive Read File
drive_read_fileRead a Google Drive file's text without downloading it, paging about 8,000 characters at a time. Export Docs, Slides and Sheets as text, Markdown or CSV, and resume from a stored offset.
Instructions
Read the text of one Drive file without saving it, a page of about 8,000 characters at a time: Google Docs and Slides export as text (Docs also as Markdown), Sheets as CSV of the first sheet, and stored text files up to 5 MB (text, Markdown, CSV, JSON, XML, HTML) are downloaded. Binary files, folders, forms and drawings fail with invalid_input; use docs_read_document for a Doc's tabs, chips and footnotes (it renders the document itself, so its body_chars differ from this export's). Returns file_id, name, mime_type, format, exported_as, modified_at, web_url and the page as body, truncated, next_offset (pass it back as offset), body_chars and body_sha256 (length and hash of the whole text).
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": {
"file_id": "<file_id>"
},
"name": "drive_read_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | 'text' (default) returns plain text; 'markdown' returns a Google Doc as Markdown (headings, lists, tables, links). Other files read the same in both formats. | text |
| offset | No | Character offset into the file's text to resume from: the next_offset of a truncated result. Omit (0) for the first page. | |
| file_id | Yes | Drive file ID: the id field of Drive and search_workspace results, or the long ID in a Drive, Docs, Sheets or Slides URL. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| format | No | ||
| file_id | No | ||
| web_url | No | ||
| mime_type | No | ||
| exported_as | No | ||
| modified_at | No |