Skip to main content
Glama

Drive Download File

drive_download_file

Save Drive files to the server's disk: stored files are downloaded as-is, while Google Docs, Sheets, Slides and Drawings are exported to PDF, PNG or a chosen format.

Instructions

Save a Drive file to the server's disk: stored files such as PDFs or images are downloaded as they are, and Google Docs, Sheets, Slides and Drawings are exported (PDF by default, PNG for Drawings, or export_mime_type). Calendar event attachments are Drive files, so download them here by their file_id; to read text without saving a file use drive_read_file. Returns status 'ok', file_id, name, mode ('download' or 'export'), mime_type, export_mime_type, saved_to and bytes_written. It writes to the server's filesystem, so it works only when the server runs locally and is rejected with picker_required over remote MCP; Google limits exports to 10 MB.

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": {
      "file_id": "<file_id>",
      "output_path": "<output_path>"
    },
    "name": "drive_download_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_idYesDrive file ID: the id field of Drive and search_workspace results, or the long ID in a Drive, Docs, Sheets or Slides URL.
overwriteNoReplace a file already at output_path; when false the call fails if it exists.
output_pathYesDestination file path on the machine running the server, e.g. '/tmp/report.pdf'; missing parent directories are created. Files over the server's MCP_MAX_DOWNLOAD_BYTES limit (250 MiB by default) fail.
export_mime_typeNoFormat a Google-native file is exported to, which must suit its type, e.g. 'application/pdf', 'text/plain' or 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' for Docs, 'text/csv' (first sheet only) or 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' for Sheets; drive_get_file lists the valid ones as export_formats. Omit for PDF (PNG for Drawings); ignored for stored files, which are saved as they are.
acknowledge_abuseNoDownload a stored file even though Google flagged it as malware or abusive; Google allows this only for the file's owner or an organizer of its shared drive.

Output Schema

NameRequiredDescriptionDefault
modeNo
nameNo
statusNoMachine-readable operation status.
file_idNo
saved_toNo
mime_typeNo
bytes_writtenNo
export_mime_typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.2.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only mark it as a non-read-only, open-world, non-idempotent write; the description adds what actually gets written (server filesystem), the environmental precondition (local server only), the remote failure mode (picker_required), and quota limits. It also discloses the dual mode semantics ('download' vs 'export') that the annotations cannot express.

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

Conciseness4/5

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

Front-loaded with the core action, then mode rules, then alternatives, then return shape and constraints — a sensible ordering. It is a single dense paragraph with no wasted sentences, though the enumerated return fields are somewhat redundant given an output schema exists.

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 5-parameter write tool with filesystem side effects, the description covers modes, defaults, alternatives, environment restrictions, failure codes and size limits. Nothing an agent needs in order to call it correctly or anticipate failure is missing.

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

Parameters3/5

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

Schema coverage is 100%, so all five parameters are already documented in structured fields. The description reinforces export_mime_type defaults (PDF, PNG for Drawings) and that it is ignored for stored files, plus the file_id sourcing from Calendar attachments, but adds little that the schema does not already say. Baseline 3 is appropriate.

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

Purpose5/5

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

Opens with a specific verb and resource ('Save a Drive file to the server's disk') and immediately splits the two behaviors: stored files downloaded as-is vs Google-native files exported. It names drive_read_file as the non-saving alternative, so an agent can distinguish it from siblings without opening a schema.

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

Usage Guidelines5/5

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

Explicit routing: use drive_read_file to read text without saving, use this tool for Calendar event attachments by file_id, and the call is rejected with picker_required over remote MCP. It also states the Google 10 MB export ceiling, which tells the agent when the call will fail rather than succeed.

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