Skip to main content
Glama

chat.media.download

Download media attachments from Google Chat by resource name through the Chat API and return the requested resource as JSON.

Instructions

Downloads media. Download is supported on the URI /v1/media/{+name}?alt=media [HTTP GET]. Returns the requested resource as JSON — request bodies are built from the typed parameters (typed flags win over the params map), or read whole from body_file Siblings over the same resource: upload.

Input Schema

NameRequiredDescriptionDefault
queryNoExtra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe.
paramsNoParameter map merged into the request; typed parameters win.
dry_runNoReturn the request that would be sent, without sending it.
body_fileNoRead the request body from this file ('-' for stdin) instead of building one from the parameters.
resourceNameYes[URL path segment] Name of the media that is being downloaded. See ReadRequest.resource_name.

Output Schema

NameRequiredDescriptionDefault
resourceNameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / resourceName / description
      Previous value: -"Name of the media that is being downloaded. See ReadRequest.resource_name."New value: +"[URL path segment] Name of the media that is being downloaded. See ReadRequest.resource_name."
    • addedInput schema / properties / resourceName / pattern
      Added value: +"^.*$"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "resourceName": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

B3/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It discloses that the call is an HTTP GET and claims it 'Returns the requested resource as JSON', but for a media download this is likely inaccurate (media downloads typically return binary content), and it omits crucial behavioral context such as authentication/permission requirements, error behavior, or how large media is handled. The request-body sentence is also behaviorally irrelevant for a GET download, adding confusion rather than transparency.

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

Conciseness2/5

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

The description is front-loaded with 'Downloads media', which is good, but the long middle sentence about JSON responses, request bodies from typed parameters, and body_file is largely irrelevant to a GET media download. That sentence does not earn its place and makes the description feel like boilerplate pasted from a generic request wrapper rather than tool-specific guidance.

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

Completeness3/5

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

The schema covers all five parameters and an output schema exists, so return values need not be explained. Still, the description's claim that the tool returns JSON and its discussion of request bodies for a GET leave a misleading picture, and it omits context an agent would need — such as what kind of media (chat attachments?) and whether special permissions are required. The core identifier (resourceName) is surfaced, but the behavioral picture is incomplete.

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 description coverage is 100%, so the baseline is 3. The description largely repeats what the schema already documents — the precedence of typed parameters over the params map and the body_file alternative — rather than adding new meaning. The URI template in the description does map the {+name} segment to resourceName, which is a small addition, but it is not enough to raise the score.

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 first sentence states 'Downloads media' — a specific verb and resource — and the closing note names the sibling upload tool, so the agent can distinguish it from upload. However, the middle sentence about JSON responses and request bodies built from typed parameters or body_file is a generic wrapper description that muddies the specific download purpose and may mislead an agent into thinking this is a general HTTP request builder rather than a media download.

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

Usage Guidelines3/5

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

Usage is implied by 'Downloads media' and the sibling note 'upload', but there is no explicit statement of when to use this tool versus alternatives like chat.spaces.messages.attachments.get or what preconditions apply (e.g., the media must be referenced by resourceName). The description provides no when-not guidance or selection criteria beyond the upload sibling.

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