downloadFile
Downloads a Google Drive file to a local path, exporting Google Workspace files (Docs, Sheets, Slides, Drawings) to a chosen format such as PDF, DOCX, XLSX, or PPTX.
Instructions
Downloads a file from Google Drive to the local filesystem. For Google Workspace files (Docs, Sheets, Slides, Drawings), specify an export format (e.g. pdf, docx, md, xlsx, csv, pptx). For regular files (images, PDFs, etc.), downloads the original file directly.
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>",
"localPath": "<localPath>"
},
"name": "downloadFile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileId | Yes | The ID of the file to download. | |
| localPath | Yes | The local file path to save the downloaded file to. Can be an absolute path or relative to the current working directory. If a directory is provided, the file will be saved with its Drive name. | |
| exportFormat | No | Export format for Google Workspace files. Docs: pdf, docx, md, txt, html, rtf, odt, epub. Sheets: pdf, xlsx, csv, tsv, ods. Slides: pdf, pptx, odp, txt. Drawings: pdf, png, jpg, svg. Ignored for non-Google files (they download as-is). |