Skip to main content
Glama

Download Attachment

get_attachment

Download an email or calendar attachment to disk and receive its local path. Specify the attachment ID, with optional custom filename and target directory.

Instructions

Download an attachment to disk and return its path.

Works for both mail and calendar attachments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameNooverride the server-supplied file name.
target_dirNodestination directory. Default /tmp/attachments (override with EXCHANGE_ATTACHMENT_DIR).
attachment_idYesattachment_id from get_email or get_event.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

Annotations already declare readOnlyHint=false, so the description's 'download to disk' aligns with that. It adds the return-path behavior and the mail/calendar applicability. However, it doesn't disclose pitfalls like filename collisions or permission requirements. With annotations covering the safety profile, a 3 is appropriate.

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?

Two concise sentences, front-loaded with the core action. No redundant information.

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?

The combination of annotations, 100% schema coverage, and the description's clear scope makes the tool usable. The only missing context (where attachment_id comes from) is provided by the parameter description. Output schema exists, so return values need no explanation. A 4 reflects a minor gap: no explicit workflow advice, though it's implied.

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?

The input schema covers 100% of parameters with descriptions, and the description itself contains no parameter details. It relies on the schema, which already explains attachment_id source, filename override, and target_dir default. Baseline 3.

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 description uses a specific verb ('Download') and resource ('attachment'), stating it saves to disk and returns a path. This clearly distinguishes it from sibling tools like get_email or get_event, which handle the parent objects.

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?

It explicitly states it works for both mail and calendar attachments, giving clear scope. It doesn't mention alternatives or when-not-to-use, but no direct alternative exists among siblings. This is clear context without exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mainpart/owa-mail-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server