Skip to main content
Glama

gmail.users.messages.attachments.get

Fetches a specific Gmail message attachment using user, message, and attachment IDs, returning its data as JSON.

Instructions

Gets the specified message attachment [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

Input Schema

NameRequiredDescriptionDefault
idYes[URL path segment] The ID of the attachment.
queryNoExtra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe.
paramsNoParameter map merged into the request; typed parameters win.
userIdYes[URL path segment] The user's email address. The special value `me` can be used to indicate the authenticated user.me
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.
messageIdYes[URL path segment] The ID of the message containing the attachment.

Output Schema

NameRequiredDescriptionDefault
dataNo
sizeNo
attachmentIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / id / description
      Previous value: -"The ID of the attachment."New value: +"[URL path segment] The ID of the attachment."
    • changedInput schema / properties / messageId / description
      Previous value: -"The ID of the message containing the attachment."New value: +"[URL path segment] The ID of the message containing the attachment."
    • addedInput schema / properties / userId / default
      Added value: +"me"
    • changedInput schema / properties / userId / description
      Previous value: -"The user's email address. The special value `me` can be used to indicate the authenticated user."New value: +"[URL path segment] The user's email address. The special value `me` can be used to indicate the authenticated user."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "attachmentId": {
      +      "type": "string"
      +    },
      +    "data": {
      +      "type": "string"
      +    },
      +    "size": {
      +      "type": "integer"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

C2.8/5.0
Behavior2/5

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

No annotations exist, so the description must carry the full burden. The '[HTTP GET]' tag usefully signals a read operation, but the rest is generic template prose about request bodies and body_file that is meaningless for a GET attachment download; nothing is said about the base64 encoding of Gmail attachment data or size limits.

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 purpose clause is front-loaded and fine, but the trailing sentence about building request bodies is irrelevant boilerplate for a GET endpoint and adds noise rather than signal.

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?

An output schema exists, so return-value documentation isn't required. But for a binary/attachment retrieval tool with no annotations, the description omits behavioral essentials (encoding, size limits) that an agent would want before calling.

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 the schema already documents userId, messageId, id, query, params, dry_run, and body_file. The description only clarifies precedence ('typed flags win over the params map') and body_file behavior, adding marginal value beyond the schema.

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?

States a specific verb (Gets) and resource (the specified message attachment), which maps cleanly to the name. It does not differentiate from close siblings such as gmail.users.messages.get (retrieves the message, not the binary attachment) or chat.spaces.messages.attachments.get, so it stops short of a 5.

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

Usage Guidelines2/5

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

There is no guidance on when to use this versus gmail.users.messages.get or the Chat equivalent, nor any prerequisite (auth scopes, attachment size limits). The agent must infer usage purely from the name.

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