Skip to main content
Glama
Google Workspace MCP Server - Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Forms & Drive

Google Workspace MCP Server - Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Forms & Drive

Get Drive File Download URL

get_drive_file_download_url
Read-onlyIdempotent

Download 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

NameRequiredDescriptionDefault
file_idYesThe Google Drive file ID to download.
export_formatNoOptional 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_emailYesThe user's Google email address. Required.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.3.0
    • changedInput schema / properties / export_format / description
      Previous value: -"Optional export format for Google native files.\n          Options: 'pdf', 'docx', 'xlsx', 'csv', 'pptx'.\n          If not specified, uses sensible defaults (PDF for Docs/Slides, XLSX for Sheets).\n          For Sheets: supports 'csv', 'pdf', or 'xlsx' (default)."New value: +"Optional export format for Google native files.\n          Options: 'pdf', 'docx', 'xlsx', 'csv', 'pptx', 'png', 'jpg', 'svg'.\n          If not specified, uses sensible defaults (PDF for Docs/Slides, XLSX for Sheets,\n          PNG for Drawings).\n          For Sheets: supports 'csv', 'pdf', or 'xlsx' (default)."
  2. Changed2 schema fields changedv1.28.0
    • removedInput schema / properties / export_format / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / export_format / type
      Added value: +"string"
  3. Addedv1.0.1

TDQS

A4.4/5.0
Behavior5/5

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

The description adds substantial behavioral detail beyond the annotations: stdio saves to local disk, HTTP returns a temporary URL valid for 1 hour, stateless mode embeds the file up to configured byte limits, and Google native files are exported to specific formats. These are important operational traits an agent would not infer from the schema or annotations alone.

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

Conciseness5/5

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

Despite covering multiple deployment modes and export mappings, the description is well structured and front-loaded with the core operation. The mode-specific return behavior and export-format bullets each earn their place.

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?

The tool has an output schema, so return values need not be exhaustively explained, yet the description still covers the key return modes. It also explains size limits and Google native export behavior, making the definition complete for correct invocation.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already documents the three parameters. The description adds useful semantic detail for export_format by mapping Google Docs, Sheets, Slides, and Drawings to their supported formats and defaults.

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 description states a specific verb and resource: downloading a Google Drive file and returning either a local path, temporary URL, or embedded resource. It clearly describes the operation, but it does not differentiate itself from sibling tools such as get_drive_file_content or get_drive_shareable_link.

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 provides clear context for when the behavior changes by deployment mode and by Google native file type, including export format behavior. It does not explicitly say when to prefer this tool over sibling download/content/link tools, but the intended use case is clear.

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