Skip to main content
Glama

Get attachment

mail_get_attachment
Read-only

Fetches an email attachment by message and part ID, returning it as text or a small inline file with the sender's original file name and content intact.

Instructions

Fetches one attachment as text or as a small inline file. The file name and text are as the sender wrote them.

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": {
      "id": "<id>",
      "part": "<part>"
    },
    "name": "mail_get_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesOpaque message id.
partYesPart identifier from `mail_get_message`.
offsetNoUnicode scalar offset into a text part. Omitted means the start.

Output Schema

NameRequiredDescriptionDefault
nameYes
sizeYes
textYes
next_offsetYes
bytes_base64Yes
content_typeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare read-only, non-destructive, open-world behavior, so the description is free to add value elsewhere — and it does: it discloses the return modality (text vs. inline file), signals an implicit size ceiling with "small inline file", and warns that content is verbatim as the sender wrote it (i.e., unsanitized, untrusted). It stops short of stating what happens on oversized attachments or ineligible parts.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with the operation and followed by a caveat about fidelity. Nothing is padded and nothing displaces the core statement.

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 values need no explanation, and safety is covered by annotations. The remaining gap is functional: the description never says how text vs. inline-file delivery is determined (automatic by MIME type or size?), leaving an agent unsure what it will receive 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 description coverage is 100%, so `id`, `part`, and `offset` are already fully documented, and the description adds no parameter-level meaning. Baseline 3 applies when the schema does all the work.

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?

"Fetches one attachment" names a specific verb and a specific resource, and scopes it to a single item. It clearly reads as an attachment-retrieval tool, though it never explicitly contrasts itself with mail_get_message, which the agent must infer.

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?

The description offers no when-to-use or when-not-to-use guidance and names no alternative. The only workflow hint (that `part` comes from `mail_get_message`) lives in the schema, not the description, so an agent skimming the prose gets no routing signal.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.