Skip to main content
Glama
mail-mcp

mail-mcp

by honest-magic

get_attachment

Read-only

Download an email attachment over IMAP by specifying the account, email UID, filename, and optional folder; works with Gmail, Outlook, and custom domains.

Instructions

Download an email attachment via IMAP — works with any provider (Gmail, Outlook, custom domains).

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

Input Schema

NameRequiredDescriptionDefault
uidYesThe UID of the email
folderNoThe folder containing the email (default: INBOX)
filenameYesThe name of the attachment file
accountIdYesThe ID of the account to use

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare a safe read operation (readOnlyHint=true, destructiveHint=false), so the description needn't restate safety. It adds the useful context that this works across Gmail, Outlook, and custom domains via IMAP, but says nothing about authentication requirements, attachment size limits, or how the downloaded content is surfaced to the caller — a meaningful gap for a download tool.

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 front-loaded sentence with the action first and the compatibility caveat second; nothing redundant or padded. Every clause carries information an agent can use.

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?

Annotations cover safety and the schema covers all four parameters, but the tool has no output schema, so the description is the only place to explain what 'download' returns — a file path, base64 content, or a URL. That omission leaves the caller guessing about the result of a 3-required-parameter call.

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 accountId, uid, folder, and filename are all documented in the input schema with defaults. The description adds no meaning beyond that, which is the expected baseline when the schema does the full job.

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 and resource ('Download an email attachment') plus the transport ('via IMAP'), which tells an agent exactly what the call does. It does not distinguish this from the sibling extract_attachment_text, so an agent must infer whether it wants the raw file or extracted text.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Usage is only implied by the verb 'Download' — the definition gives no explicit when-to-use, no exclusions, and no pointer to extract_attachment_text as the alternative for text-only needs. 'Works with any provider' is a compatibility note rather than selection guidance.

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