Skip to main content
Glama

Apumail — Email & SMS for AI Agents

download_attachment

Download a file attached to a mail on this inbox (received OR sent). Returns the file base64-encoded plus its filename and content_type. Attachment ids come from the attachments array on each mail returned by read_inbox / read_sent / read_archived. Use this to read an emailed document (PDF, image, CSV…) that landed in the inbox.

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": {
      "address": "<address>",
      "token": "<token>",
      "mail_id": "<mail_id>",
      "attachment_id": "<attachment_id>"
    },
    "name": "download_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
tokenYesThe inbox token.
addressYesThe inbox address.
mail_idYesThe id of the mail the attachment belongs to.
attachment_idYesThe attachment id (from the mail's `attachments` array).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does meaningful work: it discloses the return encoding (base64 plus filename and content_type) and the source of the identifiers, which no structured field provides. It omits failure behavior (invalid attachment_id, oversized files) and does not explicitly declare the operation read-only, which is the main remaining gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three front-loaded sentences: what it does and returns, then where the id comes from, then the representative use case. Slightly redundant in restating the `attachments` array's origin twice, but every sentence is on-topic and none is padded.

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?

For a four-required-parameter read tool with no annotations and no output schema, the description covers purpose, prerequisite workflow, and return shape, which is most of what an agent needs. Missing only edge-case behavior such as invalid ids or size limits on large base64 payloads.

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 all four parameters are already documented in the input schema. The description reinforces where `attachment_id` originates, but that is repeated from the schema and it adds no format or constraint detail beyond what is already structured.

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 ("Download a file attached to a mail") and narrows scope explicitly to received OR sent mail on this inbox, which separates it from generic mail-reading siblings. It also names the concrete return payload (base64 file plus filename and content_type), so an agent knows exactly what operation it is choosing.

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 a clear use case ("read an emailed document (PDF, image, CSV…) that landed in the inbox") and states the prerequisite that attachment ids come from the `attachments` array produced by read_inbox / read_sent / read_archived. It does not state when not to use it or what happens if the id is stale, so it falls just short of fully explicit routing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources