Skip to main content
Glama
Receipt Sweep

Receipt Sweep

by saranya-ms

save_attachment

Downloads an email attachment from a specified message and writes it to a local path, enabling receipt and invoice files to be stored for spending reports.

Instructions

Download an email attachment and save it to disk.

Args: message_id: The message ID from search_emails results. filename: The attachment filename (from read_email's attachments list). save_path: Local file path to save the attachment to. folder: The folder the message is in.

Returns the path to the saved file, or an error message.

Input Schema

NameRequiredDescriptionDefault
folderNoINBOX
filenameYes
save_pathYes
message_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, so the safety profile is covered. The description adds that it writes to disk and that it returns the saved path or an error, but it omits meaningful write-side behavior: whether an existing file at save_path is overwritten, whether the directory must exist, and any 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose sentence is front-loaded and the Args list is compact and scannable, with no filler. The docs-style block is slightly longer than a prose alternative would be, but it earns its space given 0% schema coverage.

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?

With an output schema present, the description needn't detail return values (it still notes the path/error return), and annotations cover the safety profile. The main residual gap is write-behavior detail such as overwrite semantics, but the core inputs and provenance are complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the parameter burden, and it does so by explaining all four params including the otherwise-undocumented 'folder' as 'the folder the message is in'. It adds provenance for message_id and filename, though it does not disclose the INBOX default for folder.

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?

The first sentence names a specific verb and resource ('Download an email attachment and save it to disk'), which cleanly distinguishes it from siblings like read_email and read_pdf_attachment that read rather than persist. An agent can select this tool without inspecting the schema.

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?

The Args block embeds the workflow by stating where inputs come from — message_id 'from search_emails results' and filename 'from read_email's attachments list' — which tells the agent the prerequisite calls. However, it never states when to prefer this over read_pdf_attachment or any exclusion/prerequisite failure condition.

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