Skip to main content
Glama
Sealjay

mcp-hey

by Sealjay

hey_download_attachment

Download an email attachment to disk by providing the email ID and attachment ID from the email's attachments list. Saves the file locally and returns its path, filename, size, and MIME type.

Instructions

Download a single attachment from an email and save it to disk. First call hey_read_email to get the attachments[] array with IDs, filenames, and sizes, then call this tool with the attachment_id to save the file. Returns {local_path, filename, size, mime}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
email_idYesThe email's topic or entry ID (same ID used with hey_read_email — topic IDs are resolved automatically)
save_pathNoOptional path or directory to save into. Must be within ~/. Defaults to ~/Downloads/hey-attachments/<date>/<filename>. Trailing '/' is treated as a directory. Duplicate filenames are auto-numbered (invite-1.ics, invite-2.ics).
attachment_idYesThe attachment ID from hey_read_email's attachments array (format: part-N, e.g. 'part-1')

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.0
    • changedInput schema / properties / attachment_id / description
      Previous value: -"The attachment ID from hey_read_email's attachments array (e.g. 'part-1')"New value: +"The attachment ID from hey_read_email's attachments array (format: part-N, e.g. 'part-1')"
  2. Changed1 schema field changedv0.4.1
    • changedInput schema / properties / save_path / description
      Previous value: -"Optional absolute path or directory to save into. Must be within the user's home directory (~). Defaults to ~/Downloads/hey-attachments/<email_id>/<filename>. Trailing '/' is treated as a directory."New value: +"Optional path or directory to save into. Must be within ~/. Defaults to ~/Downloads/hey-attachments/<date>/<filename>. Trailing '/' is treated as a directory. Duplicate filenames are auto-numbered (invite-1.ics, invite-2.ics)."
  3. Changed2 schema fields changedv0.3.4
    • changedInput schema / properties / email_id / description
      Previous value: -"The email ID containing the attachment"New value: +"The email's topic or entry ID (same ID used with hey_read_email — topic IDs are resolved automatically)"
    • changedInput schema / properties / save_path / description
      Previous value: -"Optional absolute path or directory to save into. Defaults to ~/Downloads/hey-attachments/<email_id>/<filename>. Trailing '/' is treated as a directory."New value: +"Optional absolute path or directory to save into. Must be within the user's home directory (~). Defaults to ~/Downloads/hey-attachments/<email_id>/<filename>. Trailing '/' is treated as a directory."
  4. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, and openWorldHint=true (a filesystem-writing, non-idempotent operation). The description adds genuinely new behavior: the path must stay within ~, the default save location, and duplicate-filename auto-numbering (invite-1.ics, invite-2.ics), which is the concrete explanation for the non-idempotent hint. It does not mention permission or overwrite failure modes, so it falls short of a 5.

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 with zero filler: purpose first, then the prerequisite workflow, then the return shape. Every sentence earns its place and the most important constraint (read email first) is front-loaded.

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

Completeness5/5

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

There is no output schema, but the description supplies the return shape ({local_path, filename, size, mime}), the prerequisite tool, and the save-path behavior. Combined with complete schema coverage and annotations, an agent has everything needed to invoke it correctly.

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 all three parameters (including the save_path default and directory semantics) are already fully documented in the schema. The description only restates that attachment_id comes from hey_read_email's attachments[] array, which the schema also says, so it adds little beyond baseline.

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 concrete verb+resource+effect: 'Download a single attachment from an email and save it to disk.' It is the only download/attachment tool among the siblings, so the scope is unambiguous without opening any schema.

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

Usage Guidelines5/5

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

Gives an explicit two-step workflow: call hey_read_email first to obtain the attachments[] array, then call this tool with the attachment_id. It names the prerequisite sibling and the exact input it provides, so an agent knows when and how to sequence the call.

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