Get Drive File Download URL
get_drive_file_download_urlDownload a Google Drive file by ID and return a local path, temporary URL, or embedded resource, with export options for Docs, Sheets, Slides, and Drawings.
Instructions
Downloads a Google Drive file and saves it to local disk.
In stdio mode, returns the local file path for direct access. In HTTP mode, returns a temporary download URL (valid for 1 hour). In stateless mode (no file storage), returns the file itself as an embedded resource, up to WORKSPACE_MCP_STATELESS_INLINE_MAX_BYTES (default 10 MiB, and never more than WORKSPACE_MCP_MAX_FILE_BYTES when that is set).
For Google native files (Docs, Sheets, Slides, Drawings), exports to a useful format:
Google Docs -> PDF (default) or DOCX if export_format='docx'
Google Sheets -> XLSX (default), PDF if export_format='pdf', or CSV if export_format='csv'
Google Slides -> PDF (default) or PPTX if export_format='pptx'
Google Drawings -> PNG (default), or PDF, JPG or SVG if export_format='pdf', 'jpg' or 'svg'
For other files, downloads the original file format.
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": {
"user_google_email": "<user_google_email>",
"file_id": "<file_id>"
},
"name": "get_drive_file_download_url"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | The Google Drive file ID to download. | |
| export_format | No | Optional export format for Google native files. Options: 'pdf', 'docx', 'xlsx', 'csv', 'pptx', 'png', 'jpg', 'svg'. If not specified, uses sensible defaults (PDF for Docs/Slides, XLSX for Sheets, PNG for Drawings). For Sheets: supports 'csv', 'pdf', or 'xlsx' (default). | |
| user_google_email | Yes | The user's Google email address. Required. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |