Skip to main content
Glama
@marlinjai/email-mcp

@marlinjai/email-mcp

by marlinjai

email_save_attachment

Save an email attachment directly to a downloads directory and return file metadata only, avoiding token costs from passing large attachments through the model.

Instructions

Download an email attachment and save it directly to disk, returning metadata only (no base64 in the response) — avoids paying the token cost of round-tripping large attachments through the calling model. outputPath is relative to a fixed downloads directory (/root/.email-mcp/downloads, override with EMAIL_MCP_DOWNLOADS_DIR) and cannot escape it.

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>",
      "emailId": "<emailId>",
      "attachmentId": "<attachmentId>",
      "outputPath": "<outputPath>"
    },
    "name": "email_save_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
emailIdYes
accountIdYes
outputPathYesRelative file path (within the downloads directory) to save the attachment as
attachmentIdYes
sourceFolderNoSource folder (required for IMAP/iCloud when email is not in INBOX)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.11.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does a solid job: it discloses the metadata-only return format, that outputPath is resolved against a fixed downloads directory, the override env var, and that paths 'cannot escape it' (path-traversal protection). Gaps remain on overwrite behavior for existing files and permission/error semantics.

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?

Two sentences, both load-bearing: the first states action and return shape, the second states path resolution and the security constraint. The purpose is front-loaded and there is no redundant restatement of the tool name or title.

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 5-parameter mutation-ish tool with no annotations and no output schema, the description covers the highest-risk aspects: what the return payload does and does not contain, and how the destination path is constrained. It stops short of describing what metadata fields are returned or what happens on filename collision, which would be the last piece needed for full confidence.

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 coverage is only 40% (outputPath and sourceFolder only), so the description needs to compensate. It meaningfully enriches outputPath by adding the resolved root directory, the EMAIL_MCP_DOWNLOADS_DIR override, and the sandbox restriction — none of which the schema states. The three identifier parameters (accountId, emailId, attachmentId) get no added meaning in either field, leaving part of the schema under-documented.

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?

The description opens with a specific verb and resource ('Download an email attachment and save it directly to disk') plus a distinguishing behavioral trait ('returning metadata only (no base64 in the response)'). This implicitly separates it from the sibling email_get_attachment, but it never names that sibling, so the differentiation is inferential rather than explicit.

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?

The rationale 'avoids paying the token cost of round-tripping large attachments through the calling model' gives a clear motivation for choosing this tool, which implies the when-to-use case. However, no alternative is named and there is no explicit when-not guidance (e.g. 'if you need the bytes inline, use email_get_attachment'), so usage must be inferred.

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