Skip to main content
Glama

gws-mcp__gmail_get_attachment

Read-only

Gets one attachment of a Gmail message by the message ID and the attachment's part ID, both of which gmail_read lists for each attachment. Describes the attachment and, when it is text, returns that text. Every response carries the file name, MIME type, size in bytes and a current attachment ID. For a text attachment (plain text, CSV, JSON, XML, HTML, calendar files and similar) of up to 0.5 MB, the response also carries the content as text, cut at 200,000 characters with a marker saying how much was left out, and with characters that cannot be seen removed. For any other type, or a larger file, no content is returned: the response states the size and the reason, and the attachment ID it carries is the one gmail_save_attachment_to_drive takes to put the file in Drive, where drive_read_file reads Word, Excel and PowerPoint files. File bytes are not returned as base64 for any type.

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": {
      "message_id": "<message_id>",
      "part_id": "<part_id>"
    },
    "name": "gws-mcp__gmail_get_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
accountNoOptional email address of the connected account to use (e.g. 'user@gmail.com'). If omitted, the default account is used.
part_idYesThe attachment's part ID from gmail_read, such as "1" or "0.1". It is the attachment's place in the message and is the same on every read, where an attachment ID is issued new each time.
message_idYesThe ID of the message the attachment is on.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true; the description goes well beyond by disclosing the 0.5 MB size gate, the 200,000-character truncation with an omission marker, stripping of non-visible characters, and the exact fallback behavior for non-text or oversized files. These are the limits an agent must know to interpret an empty content field correctly.

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-loads the core action and identifier provenance, then layers the content/size rules. Dense and mostly waste-free, though the final sentence about base64 is a slight restatement of the preceding 'no content is returned' clause.

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 full burden of describing the response — file name, MIME type, size, fresh attachment ID, and conditional text content — and it does so completely. An agent knows exactly what it will receive in every branch.

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 both required parameters are already documented, including the part-ID-vs-attachment-ID distinction. The description still adds routing value by naming gmail_read as the source of both IDs and by tying the returned attachment ID to gmail_save_attachment_to_drive, but it does not add new syntax or format guidance.

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?

States a specific verb and resource ('Gets one attachment of a Gmail message') plus the two identifiers needed, and distinguishes itself from gmail_read (which only lists attachments) and gmail_save_attachment_to_drive (which moves the file). An agent can select it 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 Guidelines5/5

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

Explicitly routes the agent: use this for text attachments under 0.5 MB, but for Word/Excel/PowerPoint the path is gmail_save_attachment_to_drive followed by drive_read_file. It also states what not to expect (no base64 bytes for any type), which is a genuine exclusion rather than an implied one.

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.