Skip to main content
Glama

Read an AgentMail attachment

read_agentmail_attachment
Read-only

Open one attachment of an AgentMail message and return what is in it. Text, CSV, JSON, HTML and code files come back as themselves; images come back as pictures the assistant can look at (a large photo, or a HEIC or TIFF, is scaled down to a JPEG; images up to 25 MB); PDFs, Word files and other documents come back as the text AgentMail extracted from them, when it extracted any; a PDF with no extracted text comes back whole as a document (an embedded application/pdf resource). Up to 10 MB. Get attachmentId from get_agentmail_message or get_agentmail_thread.

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": {
      "mailbox": "<mailbox>",
      "messageId": "<messageId>",
      "attachmentId": "<attachmentId>"
    },
    "name": "read_agentmail_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
mailboxYesAddress of the connected AgentMail inbox to act on. Call list_authorized_mailboxes to see available options.
messageIdYes
attachmentIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare readOnly/non-destructive/closed-world; the description adds substantial unstated behavior: per-type return formats, JPEG downscaling of large/HEIC/TIFF images, a 25 MB image ceiling, a 10 MB overall limit, and the fallback that a text-less PDF returns as an embedded application/pdf resource.

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 formats, then limits, then provenance — a logical order with no filler. The size limits are split awkwardly ("Up to 10 MB" trails after the PDF case), which is the only structural weakness.

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?

No output schema exists, yet the description fully describes what comes back for every input type, including binary fallback and size caps. For a three-parameter read tool that is complete enough to call correctly on the first try.

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 only 33% (only mailbox is documented). The description compensates for the least obvious parameter by explaining where attachmentId comes from, but messageId is left undocumented in both schema and description. Partial compensation merits a 3.

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 ("Open one attachment of an AgentMail message and return what is in it") plus the exact return contract per file type, which distinguishes it from get_agentmail_message/get_agentmail_thread and from the Gmail/Outlook sibling readers.

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 the concrete prerequisite workflow: "Get attachmentId from get_agentmail_message or get_agentmail_thread." That tells the agent how to enter this tool. It stops short of stating exclusions (e.g., when to prefer save_*_attachment_to_drive), so it is clear context without alternatives.

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