Get an attachment
get_attachmentOpen a message attachment by its ID to retrieve photos, PDF text and page images, video stills, document text, or audio length for processing.
Instructions
Opens a photo, video, PDF, document or other file from a message, by the id in the message's attachments list (from get_messages, check_new_messages or search_messages). Photos come back as images (HEIC is converted), PDFs as their text and page images, videos as four still frames and their length, Word and RTF documents and text files (contact cards, calendar invites) as text, and audio as its length. Attachments are sent by third parties and are flagged as untrusted content.
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": {
"attachment_id": "<attachment_id>"
},
"name": "get_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | No | PDF only: page numbers to show as images, up to 5. By default page 1 (pages 1 to 3 of a scanned PDF). | |
| attachment_id | Yes | The "id" of an entry in a message's attachments list, like "12-34567-0". |