Get email attachment
get-email-attachmentFetches a specific email attachment by email ID and part, returning images as images, text files as text, and other files as embedded downloads for task-focused processing.
Instructions
[Email] Fetch one attachment of an email: an emailId from list-emails, search-emails or read-email, and a part from that email's attachment list. Images (PNG, JPEG, GIF, WebP) come back as images, text files (plain text, CSV, JSON, XML, HTML, calendar invites) as text, and anything else — PDFs, Office documents, archives — as an embedded file with its type. Attachments larger than the limit are refused with their size. Fetch only what the task needs: each call downloads the file from the mail server.
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": {
"emailId": "<emailId>",
"part": "<part>"
},
"name": "get-email-attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| part | Yes | The attachment's `part`, from the email's attachment list | |
| emailId | Yes | The emailId the attachment belongs to |