Skip to main content
Glama
mail-mcp-server

mail-mcp-server

save_attachments

Save a message's attachments to a local directory without altering the mailbox; existing files are preserved with numbered suffixes.

Instructions

Save a message's attachments to a local directory (absolute path, created if missing); never overwrites, a taken name gets a numbered suffix. Optionally only the named files. Changes nothing in the mailbox.

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": {
      "mailbox": "<mailbox>",
      "message_id": "<message_id>",
      "dir": "<dir>"
    },
    "name": "save_attachments"
  }
}

Input Schema

NameRequiredDescriptionDefault
dirYes
mailboxYesA connected mailbox address (see list_mailboxes)
filenamesNo
message_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4/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 a good job: it discloses directory creation, the never-overwrite guarantee with numbered-suffix naming, and that mailbox state is untouched. It omits error behavior (e.g. a requested filename that doesn't exist) and any permission/connection prerequisites.

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?

A single dense sentence front-loads the action and packs the directory, overwrite, and optional-filter facts without filler. The parentheticals make it slightly clunky but every clause carries 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?

No output schema and no annotations, so the description should say what comes back (returned paths, names of saved files) and what happens on failures or missing filenames. It covers the on-disk behavior well but leaves the response shape for a tool that writes files to disk undefined.

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 only 25% (just 'mailbox'), but the description compensates: 'dir' is clarified as an absolute path created if missing, and 'filenames' is clarified as an optional restriction to named files. Only message_id is left to the schema name alone, which is comparatively self-evident.

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 — 'Save a message's attachments to a local directory' — with the target explicitly named. An agent can immediately distinguish this from read tools like get_message and no sibling competes for the same action.

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 implied (save attachments to disk, optionally filtering by filename) but there is no explicit when-to-use or when-not-to-use guidance relative to siblings such as get_message, which may also expose attachments. The 'Changes nothing in the mailbox' note helps scope it as a non-mutating download but is not routing guidance.

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