Skip to main content
Glama

Get email attachment

get_gmail_attachment
Read-onlyIdempotent

One attachment from a message in the signed-in person's firm mailbox, by message_id and part_id, as base64 (5 MB max). PDF and images unless allow_any_type. Read-only. Sign-in required.

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": "get_gmail_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
part_idYespart_id from that message's attachments in get_email_thread.
message_idYesGmail message id from search_my_email or get_email_thread.
allow_any_typeNoFetch types other than PDF and images (docx, xlsx...). Defaults to false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / allow_any_type
      Added value: +{
      +  "description": "Fetch types other than PDF and images (docx, xlsx...). Defaults to false.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / message_id
      Added value: +{
      +  "description": "Gmail message id from search_my_email or get_email_thread.",
      +  "type": "string"
      +}
    • addedInput schema / properties / part_id
      Added value: +{
      +  "description": "part_id from that message's attachments in get_email_thread.",
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "message_id",
      +  "part_id"
      +]
  2. First observed

TDQS

A3.7/5.0
Behavior4/5

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

The annotations already cover safety (readOnly, idempotent, non-destructive, closed-world), yet the description still adds real behavioral facts: the payload is base64, it is capped at 5 MB, and non-PDF/image types are rejected unless allow_any_type is set. What it omits is failure behavior on oversized attachments or invalid part_ids, so it stops short of a 5.

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?

The definition is short and front-loads the resource and addressing scheme, with the size cap and type gate following immediately. It is written in fragments ('Read-only. Sign-in required.') which is efficient but slightly telegraphic rather than flowing prose.

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

Completeness4/5

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

For a single-attachment fetch with a fully described three-property schema and no output schema, the definition supplies the essentials: return encoding, size ceiling, and type restriction. The remaining gaps are error/oversize handling and the Gmail-versus-Outlook routing choice.

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 message_id, part_id, and allow_any_type are already fully documented at the point of use, including where each id comes from. The description only echoes the PDF/image default and the 5 MB ceiling, adding nothing about formats or id syntax 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?

The description names the concrete resource ('One attachment from a message in the signed-in person's firm mailbox'), the keys used to address it (message_id and part_id), and the return encoding, so it is far more specific than a restatement of the name. It does not explicitly distinguish itself from the Outlook attachment sibling, which keeps it out of the top band.

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 rather than stated: the description establishes the sign-in requirement and the default type restriction, which tells an agent when the call will fail or be limited. It never says when to choose this tool over get_outlook_attachment or get_email_thread, and offers no exclusions or prerequisites beyond sign-in.

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.

Resources