Skip to main content
Glama

Save Attachment

save_attachment
Destructive

Saves an attachment from an email to disk. Requires confirm=true; without it you get a preview of where the file would be written. 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

TableJSON Schema
NameRequiredDescriptionDefault
accountNoMail.app account the message lives in (returned alongside the id). Passing it skips searching the other accounts.
confirmNoSet to true to actually write the file. Without it you get a preview of where it would be written. Defaults to false.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

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
savedNo
attemptsNo
destinationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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."
  2. 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."
  3. 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."
  4. Changed1 schema field changed
    • addedInput schema / properties / destination / default
      Added value: +"~/Downloads"
  5. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, so the agent knows writes are destructive. The description adds important context beyond annotations: without confirm=true it only previews the destination, and omitting account/mailbox causes a scan of all accounts. It does not disclose overwrite behavior or permission requirements.

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?

Three tight sentences, front-loaded with what the tool does, followed by the critical confirm behavior and the lookup optimization. Every sentence adds distinct value.

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 destructive file-write tool, it covers the essential confirm preview and account targeting, and annotations plus output schema cover safety and returns. The main gap is not stating whether an existing file would be overwritten, but otherwise it is complete.

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%, so the schema already documents all six parameters, including defaults for confirm and destination. The description largely repeats the schema's confirm preview and account/mailbox optimization rather than adding new syntax or format detail. Baseline 3 is appropriate.

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 and resource: 'Saves an attachment from an email to disk.' No sibling performs this exact action, so an agent can distinguish it immediately.

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

Usage Guidelines4/5

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

Explains the operational condition for actually writing (confirm=true) versus preview, and tells the agent to pass account/mailbox from list_emails/search_emails to avoid scanning all accounts. It does not explicitly name alternative tools or when-not-to-use cases, but the context is clear.

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