Skip to main content
Glama

Save Email Attachment

save_email_attachment

Saves a specified email attachment to disk by locating it in an Apple Mail account, mailbox, message ID, or subject keyword and writing it to a chosen path.

Instructions

Save a specific attachment from an email to disk.

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": {
      "account": "<account>"
    },
    "name": "save_email_attachment"
  }
}

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_pathNoFull 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.
message_idNoNumeric internal Mail id returned by search_emails
attachment_nameNoName of the attachment to save
subject_keywordNoKeyword to search for in email subjects (ignored with message_id)

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv3.3.0
    • addedInput schema / properties / attachment_name / default
      Added value: +""
    • addedInput schema / properties / message_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Numeric internal Mail id returned by search_emails"
      +}
    • addedInput schema / properties / save_path / default
      Added value: +""
    • addedInput schema / properties / subject_keyword / default
      Added value: +""
    • changedInput schema / properties / subject_keyword / description
      Previous value: -"Keyword to search for in email subjects"New value: +"Keyword to search for in email subjects (ignored with message_id)"
    • changedInput schema / required
      Previous value: -[
      -  "account",
      -  "subject_keyword",
      -  "attachment_name",
      -  "save_path"
      -]New value: +[
      +  "account"
      +]
  2. 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
  3. First observedv3.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, yet it says nothing about overwrite behavior, what happens if save_path is omitted or already exists, permission/filesystem restrictions, or the response. It conveys only the implicit fact that this is a write-to-disk operation; everything else lives in the schema text or not at all.

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 no filler or redundancy. It is efficient, though its brevity edges toward under-specification for a six-parameter mutation 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?

For a six-parameter tool that writes files to disk, one generic sentence is thin, and the omission of prerequisite-discovery context is notable. An output schema exists and the schema fields are fully described, which relieves some pressure, but the description itself does not tell the agent enough about the identification and save workflow.

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 each of the six parameters, including the protected-path restrictions and the message_id/subject_keyword distinction, is already documented in the schema. The description adds no meaning beyond that, which is the baseline case for a fully documented schema.

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 states a specific verb (save) and resource (a specific email attachment) and adds the destination (to disk), so the action is unambiguous. It does not distinguish itself from near siblings such as list_email_attachments or export_emails, leaving the agent to infer that this one persists a single file rather than enumerating or bulk-exporting.

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 when-to-use guidance, no mention of prerequisites such as first resolving the message via search_emails or list_email_attachments, and no exclusions. The agent must guess the identification workflow (message_id vs. subject_keyword) and the ordering relative to sibling tools.

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