Download attachment
download_attachmentRetrieve metadata and a resource link for one email attachment, with optional inline content or PDF page-range text extraction.
Instructions
Get metadata and a resource link for one attachment. With inline, the result also includes the content. For a PDF, inline adds extracted text, and pages returns the text of a page range such as 201-400. The size limit is 10 MB. To keep an attachment as a file, or to get one over the limit, save it with save_attachment.
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": {
"messageId": "<messageId>",
"attachmentId": "<attachmentId>"
},
"name": "download_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | No | PDF page or page range to read as text, such as 201-400 | |
| inline | No | ||
| accountId | No | Account to operate on. Optional when exactly one account is connected. | |
| messageId | Yes | ||
| attachmentId | Yes | Opaque attachment ID returned by message metadata |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes |