Skip to main content
Glama
iCloud Mail MCP server

iCloud Mail MCP server

by lachsmith

Get attachment

get_attachment

Retrieves a single email attachment by message UID and index, returning text and images inline. Save PDF or Office files to disk so you can open them instead.

Instructions

Returns one attachment. Text and images come back inline. Other types (PDF, Office files) can only be saved to disk: set save to true and the file is written to the attachments folder and its path returned.

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": {
      "uid": "<uid>",
      "index": "<index>"
    },
    "name": "get_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
uidYes
saveNoWrite the file to the local attachments folder.
indexYesAttachment index from get_message.
mailboxNoINBOX

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Adds real behavior beyond the annotations: it discloses that non-text/non-image attachments are written to a local attachments folder and only the path is returned, which explains why readOnlyHint is false despite being a read-style tool. It omits what happens on failure (e.g. requesting a PDF with save=false) and any size or permission limits.

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?

Three short sentences, front-loaded with the core behavior, then the type split, then the workaround. No filler and no repetition of the tool title.

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?

There is no output schema, and the description does cover the return shape (inline content vs a file path), which is the key unknown. What remains thin is the undocumented uid/mailbox parameters and error behavior, but for a four-parameter read tool this is largely sufficient.

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 50%; the description usefully expands on save semantics and the meaning of a returned path, but uid and mailbox (default INBOX) are undocumented in both the schema and the description. Baseline 3 is appropriate given the schema carries part of the load.

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 ("Returns one attachment") and immediately distinguishes its behavior by payload type, so an agent can tell this apart from get_message or get_thread without inspecting 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 Guidelines4/5

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

Gives explicit conditional guidance for the save flag: set save to true for PDF/Office files because they cannot be returned inline, while text and images come back directly. It does not name any sibling tool as an alternative or state prerequisites for obtaining uid/index, but the type-based branching covers the main usage decision.

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