Skip to main content
Glama
hightengry

safe-imap-mcp

by hightengry

Save attachments

save_attachments

Saves email attachments from a specified message to the local attachments folder (Downloads/mail-attachments by default) without overwriting existing files; run only on user request.

Instructions

Save attachments of a message into the attachments folder on this computer (Downloads/mail-attachments by default, nowhere else). Existing files are never overwritten. Saved files are not opened or executed and are marked as downloaded from the internet. Only on the user's request; never open or run saved files.

Input Schema

NameRequiredDescriptionDefault
uidYesMessage uid
folderNoFolder path, default INBOXINBOX
accountYesMailbox address, e.g. you@example.com
indexesNoAttachment indexes from read_email; all if omitted
subfolderNoSubfolder inside the attachments folder. Default: <mailbox>/<uid>

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the write target and its default (Downloads/mail-attachments, nowhere else), the non-overwrite guarantee, and the Windows internet-zone marking applied to saved files. These are exactly the side effects an agent needs to know before writing to disk.

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?

Four short sentences, front-loaded with the core action and location, then escalating to safety constraints. No filler and nothing redundant.

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?

Covers destination, overwrite behavior, and post-save handling for a 5-parameter write tool. The one omission is what the tool returns (e.g., saved paths or a count), which matters somewhat since no output schema exists.

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 parameters like indexes, folder, and subfolder are already documented in the schema. The description adds destination context but nothing about how indexes map to attachments or how subfolder naming interacts with the default <mailbox>/<uid>.

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 attachments of a message') plus an explicit destination ('the attachments folder on this computer'), which clearly separates it from read_email (inspection only) and list_attachment_folders (listing only).

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?

Provides a real usage gate: 'Only on the user's request' and a prohibition ('never open or run saved files'). It doesn't explicitly name sibling alternatives, but the trigger condition for calling it is unambiguous.

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