Skip to main content
Glama
multi-mail

multi-mail

by yybd

Get an attachment

get_attachment
Read-only

Download a specific email attachment by message ID and part ID or filename to read text and PDF content, view supported images, or save other files to disk.

Instructions

Download one attachment of a message and return its contents. Text files and PDFs with a text layer come back as text, PNG/JPEG/GIF/WebP images (up to 5 MB) as an image you can see; any other file, and a scanned PDF, is saved under ~/.multi-mail/attachments and its path is returned with a note. Use it after read_email when the user needs what an attached invoice, report or photo says. Pick the file by part_id from read_email's attachment list, or by filename; a message with a single attachment needs neither. Returns an error listing the attachments if none matches. Does not change the mailbox.

Input Schema

NameRequiredDescriptionDefault
saveNoAlso save the file under ~/.multi-mail/attachments.
accountNoWhich mailbox: email address, alias, or local part. Optional when only one account is connected.
part_idNopartId from the attachments list of read_email.
filenameNoAttachment file name, when part_id is not known.
max_charsNoLongest text to return for text and PDF files (default 50,000); longer text is cut and marked.
message_idYesMessage id from search_emails or read_email.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.1

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so 'Does not change the mailbox' is largely redundant. However the description adds substantial behavior the annotations cannot convey: the content-type routing (text/PDF-with-text-layer to text, images up to 5 MB returned visually, everything else and scanned PDFs written to ~/.multi-mail/attachments with a path), plus the not-found error listing available attachments. It does not mention truncation behavior for max_chars or the save flag semantics, keeping it short of complete.

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?

Front-loaded with what it does and returns, then selection rules, then the safety note. Every sentence carries distinct information; nothing repeats the schema verbatim.

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, and the description compensates fully by mapping each return form (text, visible image, saved file path with note, error listing attachments). For a 6-parameter read tool with full annotation coverage, nothing an agent needs 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 baseline is 3. The description earns the extra point by explaining selector precedence — part_id preferred, filename as fallback, neither required for single-attachment messages — which is genuine cross-parameter logic the schema does not state.

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 ('Download one attachment of a message and return its contents') and immediately scopes it to a single attachment of a specific message, distinguishing it from read_email which only lists attachments. An agent knows exactly what this returns.

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?

Explicit sequencing guidance: 'Use it after read_email when the user needs what an attached invoice, report or photo says.' It also tells the agent how to select the target (part_id from read_email's list, or filename) and that a single-attachment message needs neither selector — a genuine decision rule, not a hint.

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