Skip to main content
Glama
mike-tih

icloud-mcp

by mike-tih

Email Get Attachment

email_get_attachment
Read-onlyIdempotent

Retrieve email attachments from iCloud Mail by message ID and attachment name or index. Save the file to a chosen directory or receive it inline.

Instructions

Download an email attachment.

With save_dir the file is written to disk and its path returned; otherwise the file is returned inline (images as image content, other types as an embedded resource).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folderNoIMAP folder name. iCloud folders: INBOX, Drafts, 'Sent Messages', 'Deleted Messages', Junk, Archive (see email_list_folders).INBOX
save_dirNoDirectory on the machine running this server to save the file into. Recommended when running locally (stdio). When omitted the file content is returned inline.
attachmentYesAttachment index ('1') or (partial) file name as listed by email_get_message.
message_idYesMessage ID (IMAP UID) from email_list_messages/email_search, valid within `folder` only.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the mutation safety profile. The description adds concrete behavior: it writes to disk when save_dir is provided (returning a path) and otherwise returns inline content (with type-specific handling). This goes beyond the annotations by explaining the side effect of saving a file, which is a meaningful addition.

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?

The description is two sentences with zero filler. The primary purpose is front-loaded, followed by a concise explanation of the two operating modes. Every sentence contributes essential information, and the structure is easy to parse.

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?

For a tool without an output schema, the description adequately explains return values (path, inline content with type-specific handling). It covers the both modes of operation and implicitly states the core use case. No critical information required for calling it 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 description coverage is 100%, so parameters are already well-documented. The description adds value by explaining the semantic distinction of save_dir (disk vs inline) and the return format (path vs image vs embedded resource). This supplements the schema's basic field definitions, making the tool's behavior clearer for an agent.

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?

The description opens with a specific verb and resource: 'Download an email attachment.' This unambiguously identifies the action and distinguishes it from siblings like email_get_message (which retrieves the full message) and email_get_messages. The two modes (save to disk vs inline) are briefly noted, further clarifying scope.

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?

The description provides conditional guidance on when to use save_dir versus inline return, which directly informs selection of parameters. However, it does not explicitly contrast with alternative tools or state when not to use this tool. Since the purpose is self-evident and the mode decision is clear, this is helpful but not exhaustive.

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