Skip to main content
Glama

Save Email Attachment

save_email_attachment

Save a specific email attachment to disk by finding its message through account, mailbox, subject keyword, and attachment name, then writing the file to your chosen path.

Instructions

Save a specific attachment from an email to disk.

Input Schema

NameRequiredDescriptionDefault
accountYesAccount name (e.g., "Gmail", "Work", "Personal")
mailboxNoMailbox to search in (default: "INBOX"). Use e.g. "Archive" for an already archived message; nested mailboxes use "/".INBOX
save_pathYesFull path where to save the attachment. Protected locations (shell startup and dotfiles in ~, .git/hooks, LaunchAgents, ~/Library/Application Support, ...) are rejected; see "File Access" in the README for opt-in restriction to specific folders.
attachment_nameYesName of the attachment to save
subject_keywordYesKeyword to search for in email subjects

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changedv3.2.1
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / account / description
      Added value: +"Account name (e.g., \"Gmail\", \"Work\", \"Personal\")"
    • removedInput schema / properties / account / title
      Removed value: -"Account"
    • addedInput schema / properties / attachment_name / description
      Added value: +"Name of the attachment to save"
    • removedInput schema / properties / attachment_name / title
      Removed value: -"Attachment Name"
    • addedInput schema / properties / mailbox
      Added value: +{
      +  "default": "INBOX",
      +  "description": "Mailbox to search in (default: \"INBOX\"). Use e.g. \"Archive\" for an already archived message; nested mailboxes use \"/\".",
      +  "type": "string"
      +}
    • addedInput schema / properties / save_path / description
      Added value: +"Full path where to save the attachment. Protected locations\n(shell startup and dotfiles in ~, .git/hooks, LaunchAgents,\n~/Library/Application Support, ...) are rejected; see \"File Access\"\nin the README for opt-in restriction to specific folders."
    • removedInput schema / properties / save_path / title
      Removed value: -"Save Path"
    • addedInput schema / properties / subject_keyword / description
      Added value: +"Keyword to search for in email subjects"
    • removedInput schema / properties / subject_keyword / title
      Removed value: -"Subject Keyword"
    • removedInput schema / title
      Removed value: -"save_email_attachmentArguments"
    • removedOutput schema / properties / result / title
      Removed value: -"Result"
    • removedOutput schema / title
      Removed value: -"save_email_attachmentOutput"
    • addedOutput schema / x-fastmcp-wrap-result
      Added value: +true
  2. First observedv3.1.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden, yet it omits the important traits of a filesystem-writing tool: how the target email is located (subject keyword matching), what happens on multiple matches or missing attachments, and overwrite behavior. Protected-path restrictions appear only in the schema, not the description.

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 front-loaded sentence with zero waste. It is efficient, though arguably under-specified for a 5-parameter, side-effecting tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return values need not be explained, but for a tool that searches by keyword and writes to the filesystem, the description leaves key resolution and failure behaviors undocumented, with no annotations to compensate.

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 the schema already documents every parameter including defaults and path restrictions. The description adds no parameter meaning beyond what the schema provides, so the baseline of 3 applies.

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?

States a specific verb (save), resource (attachment from an email) and destination (to disk), so the agent knows exactly what the tool does. It does not differentiate itself from the sibling list_email_attachments, which an agent might reasonably confuse with it, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives like list_email_attachments or get_email_source. The description is a bare purpose statement with no context, prerequisites, or exclusions.

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