Skip to main content
Glama

Read Email Attachment

read_email_attachment
Read-only

Use this to read the contents of an attached document (e.g. "analyze this spreadsheet", "summarize this PDF"). Parseable types (.csv, .tsv, .xlsx, .pdf, .pptx, .txt, .md) come back readable — pull row/page slices with read_attachment(attachment_id). Any other type is saved to the user's library but isn't readable; use get_email_attachment instead if you only need to fetch or transfer the file.

Provide email_data_id + attachment_id (from search_emails results). Dict with attachment_id (pass to read_attachment), filename, mimeType, summary.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
on_behalf_ofNoAn agency client's email, from list_agency_clients, to run this call in that client's account: their agents, settings, connected accounts, and credits. Omit it to act on your own account.
attachment_idNoThe attachmentId from the attachments metadata
email_data_idNoID of the email_data record (from search_emails)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / on_behalf_of
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "An agency client's email, from list_agency_clients, to run this call in that client's account: their agents, settings, connected accounts, and credits. Omit it to act on your own account."
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

With readOnlyHint=true already declared, the description adds real side-effect context the annotation cannot convey: the attachment is persisted as a chat attachment, unparseable types are saved to the library but not readable, and a handle is returned. It does not explicitly reconcile the persistence with the read-only hint, but it does not contradict it either, since no source data is modified.

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 verb chain followed by tightly organized usage and return blocks; the <summary>/<returns> structure makes it scannable. Slightly long for a three-parameter read tool, with a small amount of overlap between the type list and the sibling routing advice.

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?

There is no output schema, so the description carries the return contract itself and does so: attachment_id, filename, mimeType, summary, plus the downstream call to make with that handle. Nothing needed to invoke the tool correctly is missing.

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 the baseline is 3, but the description adds practical semantics the schema omits: it tells the agent that email_data_id and attachment_id must actually be supplied and where each comes from (search_emails results, attachment metadata), even though the schema marks all three parameters optional.

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?

Opens with a specific verb+resource chain: fetch an email attachment, persist it as a chat attachment, return a handle. It also explicitly separates itself from two siblings (read_attachment for slicing parsed content, get_email_attachment for fetch/transfer only), so an agent can route without opening a 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?

Gives concrete when-to-use triggers ("analyze this spreadsheet", "summarize this PDF"), states the boundary condition (parseable types are readable, everything else is only saved), and names the alternatives plus the condition that selects each.

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