Skip to main content
Glama

Download attachment

download_attachment
Read-only

Retrieves an Outlook message or event attachment by ID, saving it to a specified path or returning its text, image, or base64 content for use.

Instructions

Download a file attachment. With savePath the file is written to disk; otherwise text files are returned as text, images as images, and other files as an embedded base64 resource (up to 10 MB).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>"
    },
    "name": "download_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesID of the message/event that has the attachment
nameNoAttachment file name (alternative to attachmentId)
savePathNoAbsolute path to save the file to (a directory or full file path)
overwriteNoAllow replacing an existing file at savePath (default false)
attachmentIdNoAttachment ID from get_message/list_attachments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered; the description goes further by disclosing the return-format branching (text, image, base64 embedded resource) and the 10 MB size cap, which the agent cannot infer from annotations. It omits overwrite/error behavior when the target file already exists, which is a minor gap since the schema hints at it.

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 tightly written sentences with the core action first and the mode branching second; every clause carries information (mode, return types, size limit) with no redundancy.

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?

There is no output schema, so the description carries the burden of describing return values, and it does so for each branch plus the size limit. It is nearly complete for a 5-parameter read tool; only failure/overwrite semantics are left implicit.

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 coverage is 100%, so baseline is 3, but the description adds real meaning beyond the schema by explaining that savePath switches the tool from an inline-return mode to a disk-write mode, and by tying the non-savePath branch to concrete return types. The overwrite and name-vs-attachmentId tradeoffs are left to the schema text.

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?

States a specific verb and resource ("Download a file attachment") that is unambiguous and distinct from siblings like list_attachments or add_attachment. It does not explicitly name which sibling to use to obtain the attachment ID, but the purpose itself is unmistakable.

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

Usage Guidelines3/5

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

The description explains the two operating modes (write to disk with savePath vs. return inline), which is useful conditional guidance for a caller. It does not, however, say when to prefer this tool over inspecting attachments via list_attachments or get_message, so usage guidance is implied rather than explicit.

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