drive_files_download
Download a Google Drive file's content as text or base64, export Docs, Sheets, and Slides to readable formats, and save binary files like images or PDFs to a local path.
Instructions
Download a file's content from Google Drive. Returns the text content for text files, or a base64-encoded string for binary files. For Google Docs/Sheets/Slides, exports to a readable format (plain text by default).
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": {
"fileId": "<fileId>"
},
"name": "drive_files_download"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileId | Yes | The file ID to download | |
| savePath | No | For binary files (images, PDFs): save to this local path instead of returning content inline. Must be inside the server's file root (--file-root, default its working directory); a relative path resolves against the root. The file path is returned in the response. | |
| exportMimeType | No | For Google-native files (Docs/Sheets/Slides): export format. Defaults to text/plain for Docs, text/csv for Sheets. Examples: text/plain, text/csv, application/pdf |