Skip to main content
Glama
yu2001-s
by yu2001-s

fetch-attachment

Retrieve an attachment's raw bytes as base64 from an Apple Mail message by specifying the message ID and attachment name, enabling inline processing without saving to disk.

Instructions

Use when: retrieving an attachment's raw bytes inline as base64 (by message id and attachmentName), e.g. to process its contents without touching disk. Returns: the attachment's bytes base64-encoded, with its size and (for IMAP) MIME type. Do not use when: you don't know the attachment name (use list-attachments first) or you just want it saved to disk (use save-attachment).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
attachmentNameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bytesNo
mimeTypeNo
contentBase64No
attachmentNameNo
Behavior5/5

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

Discloses that the operation is read-only (retrieving inline), returns base64-encoded bytes with size and MIME type, and does not save to disk. No annotations exist, so the description fully covers behavioral traits.

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 compact with front-loaded usage conditions and return value summary. Every sentence serves a purpose with no redundancy.

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?

Given the output schema exists and the tool has only two required parameters, the description provides complete guidance on when to use and the return format.

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 description maps the two parameters to 'message id' and 'attachmentName', adding meaning over raw schema names. However, it does not explain the format of 'id' (e.g., regex pattern), which is a minor gap for 0% schema coverage.

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 retrieves attachment raw bytes inline as base64 by message id and attachment name, and distinguishes it from list-attachments and save-attachment.

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?

Explicitly provides 'Use when' and 'Do not use when' with alternatives (list-attachments, save-attachment), guiding the agent on appropriate contexts.

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/yu2001-s/apple-mail'

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