Skip to main content
Glama

download_attachment

Download a single email attachment by specifying message and attachment IDs. Supports direct image viewing or saving to a local file path.

Instructions

Download a single attachment.

Args: save_path: Write the bytes to this file path (or into this existing directory, using the attachment's name) instead of returning content. Returns {"path", "name", "content_type", "size_bytes"}.

Returns: - Image attachments (PNG/JPEG/GIF/WebP, no save_path): metadata plus the image itself as a native MCP image block, viewable directly. - With save_path: {"path", "name", "content_type", "size_bytes"}. - Otherwise: {name, content_type, size_bytes, content_base64}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mailboxNo
save_pathNo
message_idYes
include_rawNo
attachment_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.2

TDQS

B3.1/5.0
Behavior4/5

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

With no annotations provided, the description carries the disclosure burden and does a solid job: it explains the file-writing side effect of save_path and details the three possible return modes, including the native image block behavior. It does not mention auth, rate limits, or error cases, but the key behavioral variations are transparent.

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 description is well-structured with an opening summary, an Args section, and a Returns section. It is somewhat lengthy but each bullet earns its place by clarifying distinct return behavior, so there is minimal wasted text.

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?

Given there are 5 parameters, 0% schema coverage, no annotations, and no output schema, the description is not complete enough. It explains return shapes and save_path behavior well, but omits include_raw semantics, mailbox behavior, required identifier meaning, and any differentiation from download_hosted_content.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for all parameters. It gives useful detail only for save_path, while message_id, attachment_id, mailbox, and especially include_raw are left unexplained anywhere, leaving their semantics to inference.

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 opens with 'Download a single attachment,' which clearly identifies the verb and target resource. It is understandable on its own, though it does not explicitly differentiate itself from the sibling tool download_hosted_content.

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?

The description explains how save_path changes the download behavior but gives no guidance about when to choose this tool over list_attachments or download_hosted_content, and offers no exclusion criteria or alternative recommendations.

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