Skip to main content
Glama

file_download_link

Makes a download link for a file named by a file reference, so the user can save it to their own computer. A gmail_message reference gives a whole email as its original .eml exactly as Gmail returns it; a gmail_attachment reference gives one attachment of an email, named by the part id gmail_read lists for it; a drive_file reference gives a Google Drive file as stored; a drive_export reference gives a Google Docs, Sheets or Slides file exported to a format such as pdf, docx or xlsx. The answer is a receipt: the file's name, its size in bytes and its SHA-256, and a link on this service. The link opens a page with one button that saves the file. It works once and stops working after ten minutes. The receipt also carries a one-line command that saves the file without the page, under the sender's file name, in the directory it is run in. The file's content is not returned and does not enter the conversation. The link is for the user: a call to any tool on this service that carries the link is refused and the link is cancelled. One file a call, at most 25 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": "<file>"
    },
    "name": "file_download_link"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesA file reference: {"type":"gmail_message","message_id":"..."} for an email, {"type":"gmail_attachment","message_id":"...","part_id":"..."} for one attachment, {"type":"drive_file","file_id":"..."} for a Drive file as stored, or {"type":"drive_export","file_id":"...","format":"pdf"} for a Google Docs, Sheets or Slides file exported. An optional "account" names the connected Google account that holds the message or file.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes far beyond the lone readOnlyHint=false annotation: single-use link, ten-minute expiry, link is user-only and any tool call carrying it is refused and cancels the link, one file per call, 25 MB cap, and the return shape (name, size, SHA-256, page link, one-line save command). These are exactly the operational constraints an agent needs to avoid misusing the output.

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 purpose, then reference types, then the receipt's contents and limits — a logical progression with almost no filler. It runs long, and the four reference types could be terser, but each sentence conveys a distinct constraint.

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 carries the return-value burden and does so fully: it names every field of the receipt and the accompanying save command. Combined with the size cap and expiry, an agent has everything needed to call this and explain the result to a user.

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 already 100%, so the baseline would be 3, but the description adds real meaning: it clarifies that a gmail_attachment's part_id is the one "gmail_read lists for it" and that drive_export applies specifically to Docs/Sheets/Slides with formats like pdf, docx, xlsx. The only gap is that the optional "account" field is never mentioned in the prose.

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+resource ("Makes a download link for a file") and immediately enumerates the four reference types it accepts (gmail_message, gmail_attachment, drive_file, drive_export), each with its own outcome. An agent can tell this apart from content-reading siblings like gmail_read or drive_read_file without opening the schema.

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?

Gives clear situational context: the link exists so "the user can save it to their own computer," and it explicitly states the content "is not returned and does not enter the conversation," which signals when to prefer this over a content-reading tool. It does not, however, name a specific sibling as the alternative (e.g., gmail_get_attachment or drive_read_file) or state when-not to use it.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.