download_folder
Downloads all files from a Google Drive folder (non-recursively) into a local directory, skipping subfolders and optionally exporting Google Workspace files to a chosen format.
Instructions
Download all files in a Google Drive folder (non-recursive) to a local directory. Not available when the server runs with LOCAL_FILE_ACCESS=off.
For non-Google files the raw content is downloaded. Google Workspace files are skipped unless export_format is provided, in which case they are exported to that format. Subfolders are always skipped, regardless of export_format — this tool never descends into them. A file whose Drive name isn't a single ordinary filename (it contains '/' or '', is '.' or '..', etc.) is listed under 'failed' and not downloaded.
Files transfer concurrently rather than one at a time. If the caller supplied
a progressToken, a notifications/progress update is sent as each file
finishes (e.g. "12/217: report.pdf: ok"). The message text always adds bytes
transferred so far as supplementary context (#352), e.g.
"12/217, 4823001/98234112 bytes: report.pdf: ok" when every candidate's
size is known upfront, or "12/217, 4823001 bytes so far: report.pdf: ok"
when one or more candidates (a Workspace export) has an unknown size.
The structured progress/total fields default to file-count
(progress_unit='files'), for consistency with every other progress-reporting
tool in this file. Pass progress_unit='bytes' to report bytes transferred
instead, for a client that renders a progress bar from the structured fields
alone rather than parsing the message text (#741) — this only takes effect
when every candidate's size is known upfront (see _DownloadCandidate's
docstring); otherwise it silently falls back to file-count, since there's no
reliable byte total to report against.
Args: folder_id: The Google Drive folder ID. local_path: Local directory to download files into. Created only when there's at least one file to download, so a folder whose every entry is skipped or refused leaves nothing on disk. export_format: If provided, Google Workspace files are exported to this format (e.g. 'pdf', 'docx'). See download_file for full list. Without this, Workspace files are skipped. mime_type_filter: Only download files matching this MIME type. skip_if_exists: Skip files that already exist at the destination (default True). progress_unit: 'files' (default) or 'bytes' — which metric feeds the structured progress/total fields reported via notifications/progress. Falls back to 'files' when not every candidate's size is known upfront.
Returns: Summary with lists of 'downloaded', 'skipped', and 'failed' filenames, plus total 'size_bytes' downloaded.
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": {
"folder_id": "<folder_id>",
"local_path": "<local_path>"
},
"name": "download_folder"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder_id | Yes | ||
| local_path | Yes | ||
| export_format | No | ||
| progress_unit | No | files | |
| skip_if_exists | No | ||
| mime_type_filter | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||