Skip to main content
Glama
imap-mail-mcp

imap-mail-mcp

by EastMG

download_attachment

Save a single email attachment to the local ./downloads folder and return its file path so agents can access the saved file.

Instructions

Save one attachment of a message to ./downloads and return the local path.

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>"
    },
    "name": "download_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
uidYes
indexNoZero-based; see read_message attachments
accountNoAccount id or email
mailboxNoFolder path, default INBOX

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description does carry meaningful burden and does disclose the key side effect: writing a file to ./downloads and returning the resulting local path. However it omits whether existing files are overwritten, what filename is used, any size or permission constraints, and authentication requirements — gaps that matter for a filesystem-writing operation.

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?

A single sentence with zero waste, front-loaded with the action and immediately followed by the destination and return value. Nothing could be removed without losing information.

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?

Because no output schema exists, the description correctly states the return value as a local path, which is the most important missing piece. For a file-writing tool with no annotations, though, it still lacks overwrite behavior, filename conventions, and failure modes, so it is only minimally complete.

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 coverage is 75%, so most parameters are already documented, and the description only implies that 'one attachment' is selected via index and that uid identifies the message. It adds no detail on the uid/index relationship, on how index behaves when omitted, or on account/mailbox resolution beyond the schema text.

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?

States a specific verb (Save) and resource (one attachment of a message), plus the destination (./downloads) and return value (local path). It reads clearly against siblings like read_message and send_message, though it does not explicitly name the sibling used to discover attachment indexes.

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 contains no when-to-use or when-not-to-use guidance and names no alternative tool. It does not say that an index must first be obtained from read_message or that this is the follow-up step to message inspection, leaving that entirely to inference.

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