Skip to main content
Glama
SeraFxy

netease-mail-mcp

by SeraFxy

download_attachment

Read-only

Saves a selected NetEase Mail attachment to the allowed download directory or its subdirectory, validates paths, avoids overwrites, and returns file metadata plus a text excerpt.

Instructions

Save one attachment into the download dir (NETEASE_MAIL_DOWNLOAD_DIR) or a subdirectory of it: sanitized name, never overwrites or follows links, file mode 0600, marked as downloaded (macOS quarantine / Windows Zone.Identifier), ≤50 MB. Returns path, size, sha256, content_type, and a text excerpt for text/csv/json/md files.

Input Schema

NameRequiredDescriptionDefault
idYesMessage id.
indexNoAttachment index from read_message.
dest_dirNoSubdirectory of the download dir to save into (relative, or an absolute path inside it). Anything outside the download dir is refused.
filenameNoOr the attachment filename.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Goes well beyond the bare readOnlyHint: never overwrites or follows symlinks, sanitized names, mode 0600, macOS quarantine / Windows Zone.Identifier marking, and a hard 50 MB ceiling. The only tension is that a tool which writes a file and sets quarantine attributes does mutate the local environment, so readOnlyHint should be read as 'does not change mailbox state' — worth clarifying rather than contradicting outright.

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 dense sentence that front-loads the action and destination, then lists guarantees and the return payload in one more clause. No filler and nothing repeated from the schema verbatim.

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?

With no output schema, the description fully documents the return value (path, size, sha256, content_type, text excerpt for text/csv/json/md), which is exactly what an agent needs to chain calls. Remaining gaps are failure semantics: what error a >50 MB attachment produces, and what happens when both index and filename are omitted.

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 100%, so the parameters are already documented; the description still adds value by naming the NETEASE_MAIL_DOWNLOAD_DIR root that dest_dir is resolved against and by implying the 'or' relationship between index and filename. It does not restate the 'anything outside is refused' rule, but the schema covers that.

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+resource ('Save one attachment') plus the exact destination root (NETEASE_MAIL_DOWNLOAD_DIR). No sibling tool writes files, and 'attachment' plus the 'index from read_message' hint make its place in the workflow unambiguous.

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: the schema note that 'index' comes from read_message signals the read_message -> download_attachment flow, but the description itself never says when to use this versus just reading the message body or when not to use it. An agent can infer the sequence but gets no explicit routing.

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