Skip to main content
Glama

download_folder

Read-only

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

NameRequiredDescriptionDefault
folder_idYes
local_pathYes
export_formatNo
progress_unitNofiles
skip_if_existsNo
mime_type_filterNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.6

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Far beyond the readOnlyHint annotation, it discloses concurrency, filename sanitization failures ('/','\\','.','..' go to 'failed'), that local_path is created only when at least one file is actually downloaded, and the exact progress-notification format and its fallback. (Minor tension: readOnlyHint=true while the tool writes to the local filesystem, but the description is explicit about the local writes, so an agent is not misled.)

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core behavior is front-loaded, which is good, but the progress section is bloated with literal sample messages, internal issue numbers (#352, #741), and a reference to '_DownloadCandidate's docstring' that an agent cannot resolve. Roughly a third of the text could be cut without losing decision-relevant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with an output schema, six parameters, and a permission gate, the description covers availability, recursion policy, skip/export interactions, failure handling, and side effects on disk. Nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden and does so: every one of the six parameters is explained with semantics beyond the schema (folder_id purpose, local_path creation semantics, export_format's skip-without-it behavior, mime_type_filter, skip_if_exists default, and progress_unit's fallback condition).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb, resource, and scope: 'Download all files in a Google Drive folder (non-recursive) to a local directory.' The non-recursive qualifier and the 'Subfolders are always skipped' rule clearly separate it from a recursive/sync-style tool, though no sibling (e.g. download_file, sync_folder) is named explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states real gating conditions an agent must know: unavailable when LOCAL_FILE_ACCESS=off, Workspace files skipped unless export_format is set, skip_if_exists default True, and when progress_unit='bytes' silently falls back. It never explicitly says when to prefer download_file or sync_folder instead, so it lacks full when-not/alternative routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools