Skip to main content
Glama
hasan-imam

mcp-outlook-applescript

by hasan-imam

download_attachment

Download an email attachment and save it to a specified file path. Provide the email ID, attachment index, and destination; returns the saved file details.

Instructions

Download and save an email attachment to a file on disk. Use this after list_attachments to get the 1-based attachment index. Returns the saved file path, name, and size in bytes. Writes the file to the specified save_path — the parent directory must already exist. Returns an error if the email or attachment does not exist, the directory is invalid, or the attachment exceeds the size limit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
email_idYesThe email ID containing the attachment (e.g., from list_emails)
save_pathYesAbsolute file path where the attachment should be saved (e.g., "/tmp/report.pdf")
attachment_indexYesThe 1-based index of the attachment (e.g., 1 for the first attachment from list_attachments)
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that it writes to a user-specified save_path, requires the parent directory to exist, returns the saved file path/name/size, and lists specific error conditions (missing email/attachment, invalid directory, size limit). It lacks detail on overwrite behavior or authentication, but the provided transparency is strong.

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?

The description is a compact three-sentence paragraph that front-loads the main purpose and then efficiently covers usage, return values, and error cases. Every sentence contributes necessary information, with no filler or repetition of schema basics.

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?

For a file-download operation with no output schema, the description is highly complete: it covers prerequisites (list_attachments, existing directory), return values (path, name, size), and failure modes. The absence of detailed return formatting is acceptable because the return fields are explicitly listed. The description leaves little ambiguity for the agent.

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?

The input schema already covers 100% of parameters with descriptions, but the tool description adds meaningful context beyond the schema: it clarifies that attachment_index is 1-based and obtained from list_attachments, and that save_path's parent directory must pre-exist. This adds value without redundancy.

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 opens with a specific verb+resource: 'Download and save an email attachment to a file on disk.' This clearly distinguishes the tool from siblings like list_attachments (which lists attachments) and other email tools. It also mentions the 1-based index, making its purpose precise.

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 description explicitly instructs to 'Use this after list_attachments to get the 1-based attachment index,' providing a clear workflow context. It does not explicitly name alternative tools to avoid, but there is no other download tool among siblings, and the guidance is adequate for correct usage.

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/hasan-imam/mcp-outlook-applescript'

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