Skip to main content
Glama

Get Email Attachment

email_get_attachment
Idempotent

Download an email attachment to a specified local path using the email ID and attachment ID, with validation to prevent overwriting existing files.

Instructions

Download an email attachment to a validated local path.

Args: email_id: Microsoft Graph message identifier containing the attachment. attachment_id: Target attachment identifier within the message. save_path: Destination path for the attachment. Validated via ensure_safe_path; existing files are never overwritten. account_id: Microsoft account identifier.

Returns: Attachment metadata, including saved path and content size.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
email_idYes
attachment_idYes
save_pathYes
account_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

The description discloses safety validation via ensure_safe_path and that existing files are never overwritten. This adds value beyond annotations, which already indicate idempotency and non-destructiveness. Missing error handling details, but sufficient for the tool's simplicity.

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 very concise: one sentence purpose, then clear Args and Returns sections. No extraneous information; every sentence adds necessary detail.

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?

Given the presence of an output schema, the description sufficiently covers inputs and key behavior. It lacks error handling descriptions, but for a tool with 4 simple parameters, it is adequately complete.

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?

With 0% schema description coverage, the description elaborates on each parameter, including validation for save_path and the role of email_id and attachment_id. This compensates well, though format constraints (e.g., path requirements) are not specified.

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 clearly states the tool downloads an attachment to a validated local path, using specific verbs and resources. It distinguishes itself from sibling tools like 'email_get' which retrieves the message itself, not the attachment.

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?

No explicit guidance on when to use this tool versus alternatives such as 'email_get' or other attachment-related tools. The agent must infer usage from the tool name and description.

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/robin-collins/m365-mcp'

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