Download attachment
download_attachmentGet 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 resource link and REST download serve attachments up to 50 MB, and inline content is limited to 10 MB. Pages without inline reads text from PDFs up to 30 MB.
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 |