Skip to main content
Glama

download_attachment

Download an inline image from a Teams message or reply to get a local file path. Provide message, chat, or team/channel IDs with the hosted content ID.

Instructions

Download an inline image (hosted content) from a message.

For channel messages: provide team_id + channel_id + message_id. For content inside a channel REPLY: additionally pass parent_message_id (the thread root id) - Graph serves reply content only under /messages/{parent}/replies/{reply}. For chat messages: provide chat_id + message_id. hosted_content_id: from the hostedContents array in message data. Returns the local file path to the downloaded image. File attachments listed under attachments (SharePoint/OneDrive files) cannot be downloaded with this tool. The image is written to the system temp directory on the machine running this server and is not deleted afterwards.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chat_idNo
team_idNo
channel_idNo
message_idYes
hosted_content_idYes
parent_message_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.7/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden and largely meets it: it discloses the return value (local file path), the side effect (image written to the system temp directory of the server host), and that the file is not deleted afterwards. It omits auth/permission requirements and any rate-limit or cleanup behavior, so it stops 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?

Front-loaded with the one-line purpose, then broken into terse conditional lines for each message context, followed by return/side-effect notes. Every sentence adds a distinct fact and none are filler.

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 6-parameter tool with no annotations and an output schema present, the description covers exactly what the structured fields cannot: context routing, the excluded attachment type, the temp-directory side effect, and the return form. Nothing an agent needs to invoke it correctly is missing.

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 description coverage is 0%, so the description must compensate and does so meaningfully: it maps parameters to their scenarios (which combination applies to channels vs replies vs chats) and identifies the origin of hosted_content_id ('from the hostedContents array in message data'). It leaves some identifiers (team_id, channel_id, message_id) defined only by name rather than by source, so it is not fully exhaustive.

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 specific verb ('Download') and a precisely scoped resource ('an inline image (hosted content) from a message'), and immediately narrows what is NOT covered (SharePoint/OneDrive file attachments). An agent can distinguish it from siblings like get_message or search_messages 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 explicit routing rules per context: team_id+channel_id+message_id for channel messages, an added parent_message_id for channel replies, and chat_id+message_id for chats. It also states the negative case (file attachments listed under `attachments` cannot be downloaded here), which is exactly the when-not guidance an agent needs.

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