Skip to main content
Glama

Save Attachment

save_attachment
Destructive

Saves an attachment from an email to disk. Pass account= (and mailbox= if known, both from list_emails/search_emails) so the lookup targets one account instead of scanning all of them.

Input Schema

NameRequiredDescriptionDefault
accountNoMail.app account the message lives in (returned alongside the id). Passing it skips searching the other accounts.
confirmNoIgnored; kept for older clients.false
mailboxNoFolder the message lives in (returned alongside the id). Passing it skips searching the other folders.
message_idYesThe message id of the email that carries the attachment, from list_emails or search_emails. Accepts the bare id or the <angle-bracketed> form.
destinationNoFolder to write the file into. Defaults to ~/Downloads.~/Downloads
attachment_nameYesFile name of the attachment as it appears in the message.

Output Schema

NameRequiredDescriptionDefault
nameNo
savedNo
attemptsNo
destinationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / confirm / description
      Previous value: -"Set to true to actually write the file. Without it you get a preview of where it would be written. Defaults to false."New value: +"Ignored; kept for older clients."
  2. Changed6 schema fields changed
    • addedInput schema / properties / account / description
      Added value: +"Mail.app account the message lives in (returned alongside the id). Passing it skips searching the other accounts."
    • addedInput schema / properties / attachment_name / description
      Added value: +"File name of the attachment as it appears in the message."
    • addedInput schema / properties / confirm / description
      Added value: +"Set to true to actually write the file. Without it you get a preview of where it would be written. Defaults to false."
    • addedInput schema / properties / destination / description
      Added value: +"Folder to write the file into. Defaults to ~/Downloads."
    • addedInput schema / properties / mailbox / description
      Added value: +"Folder the message lives in (returned alongside the id). Passing it skips searching the other folders."
    • addedInput schema / properties / message_id / description
      Added value: +"The message id of the email that carries the attachment, from list_emails or search_emails. Accepts the bare id or the <angle-bracketed> form."
  3. Changed6 schema fields changed
    • removedInput schema / properties / account / description
      Removed value: -"Mail.app account the message lives in (returned alongside the id). Passing it skips searching the other accounts."
    • removedInput schema / properties / attachment_name / description
      Removed value: -"File name of the attachment as it appears in the message."
    • removedInput schema / properties / confirm / description
      Removed value: -"Set to true to actually write the file. Without it you get a preview of where it would be written. Defaults to false."
    • removedInput schema / properties / destination / description
      Removed value: -"Folder to write the file into. Defaults to ~/Downloads."
    • removedInput schema / properties / mailbox / description
      Removed value: -"Folder the message lives in (returned alongside the id). Passing it skips searching the other folders."
    • removedInput schema / properties / message_id / description
      Removed value: -"The message id of the email that carries the attachment, from list_emails or search_emails. Accepts the bare id or the <angle-bracketed> form."
  4. Changed6 schema fields changed
    • addedInput schema / properties / account / description
      Added value: +"Mail.app account the message lives in (returned alongside the id). Passing it skips searching the other accounts."
    • addedInput schema / properties / attachment_name / description
      Added value: +"File name of the attachment as it appears in the message."
    • addedInput schema / properties / confirm / description
      Added value: +"Set to true to actually write the file. Without it you get a preview of where it would be written. Defaults to false."
    • addedInput schema / properties / destination / description
      Added value: +"Folder to write the file into. Defaults to ~/Downloads."
    • addedInput schema / properties / mailbox / description
      Added value: +"Folder the message lives in (returned alongside the id). Passing it skips searching the other folders."
    • addedInput schema / properties / message_id / description
      Added value: +"The message id of the email that carries the attachment, from list_emails or search_emails. Accepts the bare id or the <angle-bracketed> form."
  5. Changed1 schema field changed
    • addedInput schema / properties / destination / default
      Added value: +"~/Downloads"
  6. First observed

TDQS

B3.2/5.0
Behavior2/5

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

Annotations declare destructiveHint=true, yet the description never mentions what happens if the destination file already exists, whether directories are created, or what authorization the write requires — exactly the context a destructive tool needs. The one behavioral detail it does add (that omitting account/mailbox causes a scan across all accounts) is useful but is a performance trait, not a safety one.

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?

Two sentences with the core action front-loaded and no filler. The second sentence is slightly dense with nested parentheticals ('(and mailbox= if known, both from list_emails/search_emails)'), but every clause carries information.

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

Completeness3/5

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

With a full input schema, an output schema, and annotations present, most structured burden is carried elsewhere, so the description only needs to close the remaining gaps. It does not: for a tool flagged destructive and writing to a filesystem path with a default of ~/Downloads, the absence of any overwrite/collision or failure-mode statement leaves a real hole.

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 100%, including defaults for destination and the note that confirm is ignored, so the schema already carries the parameter burden and baseline 3 applies. The description adds only the provenance of account/mailbox and the consequence of supplying them, which is a modest supplement to the schema's own wording.

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?

Names a specific verb and resource: 'Saves an attachment from an email to disk.' An agent can immediately tell this is an email-attachment extraction tool, distinct from generic file writers like file_write or whatsapp_send_file. It stops short of explicitly naming the sibling it should be preferred over, but the resource (email attachment) is 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?

The description gives a concrete recommendation for supplying account= and mailbox= and points to list_emails/search_emails as the source of those values, which is genuinely actionable. However, it frames this as a lookup-performance tip rather than tool-selection guidance: it never says when to use this instead of a generic file-write tool, nor any precondition for calling it.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources