Skip to main content
Glama

Download file content

download_file
Read-onlyIdempotent

Downloads a file's bytes from Google Drive by file ID, saving to a local path or returning small text inline. Handles shortcuts and flagged malware with proper parameters.

Instructions

Downloads a binary file's bytes. With save_path (absolute local path) the file is written to disk (refuses to overwrite unless overwrite=true) and the result reports saved_to/bytes; without save_path small textual files (≤100 KB, text/JSON/XML) are returned inline as content. Google-native files (Docs/Sheets/Slides — mimeType application/vnd.google-apps.*) have no bytes: this tool rejects them, use export_file; for a shortcut it names the real target to download instead. acknowledge_abuse=true downloads a file Drive flagged as malware/abuse (owner only).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_idYesThe file id — the long id from the Drive URL (drive.google.com/file/d/<fileId> or docs.google.com/.../d/<fileId>/edit) or from search_files/get_file output. Folders and shared-drive items are files too.
overwriteNoReplace save_path if it already exists (default false).
save_pathNoAbsolute local path to write the file to (required for binary or >100 KB content).
acknowledge_abuseNoDownload even though Drive flagged the file as abusive (owner only).
Behavior5/5

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

Even with readOnly/idempotent annotations, the description adds meaningful behavioral detail: overwrite refusal unless overwrite=true, inline size/type limits, rejection of Google-native files, shortcut resolution, and abuse-download restrictions. No contradictions with annotations.

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?

The description is front-loaded with the core action, then uses compact conditional clauses to cover modes, exceptions, and edge cases. Every sentence carries essential routing or behavioral information without filler.

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?

With no output schema, the description still tells the agent what to expect in each mode (saved_to/bytes vs inline content) and all relevant caveats. An agent has enough information to decide when and how to invoke the tool, including what to do for Google-native and flagged files.

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 baseline is 3, but the description adds real value beyond the schema: it explains the overwrite refusal behavior and the owner-only constraint on acknowledge_abuse. It could have also clarified file_id, but the schema already documents that adequately.

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?

The description opens with a specific verb and resource ('Downloads a binary file's bytes') and immediately clarifies the two operating modes. It also explicitly separates itself from export_file for Google-native files, making sibling differentiation clear.

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?

The description gives concrete decision rules: use save_path for writing to disk, inline return for small text files, export_file for Google-native files, and acknowledge_abuse for flagged files. It explicitly names an alternative tool and the condition that selects it.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/A1-x-Tech/mcp-google-drive'

If you have feedback or need assistance with the MCP directory API, please join our Discord server