Read an attachment
read_attachmentRead an email attachment inline to extract text from PDFs, CSV, JSON, ICS, and EML files or view images when local files are inaccessible; use save for other binary types.
Instructions
Read an attachment inline. Text comes back as text: PDFs via pypdf, plus text/csv/json/ics/eml, for invoices, decks, reports. An image comes back as a viewable image, the only way to see a photo or a scan when the client cannot read local files. Other binary types must use save_attachment instead.
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": {
"uid": "<uid>"
},
"name": "read_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | ||
| folder | No | Default INBOX. | |
| filename | No | Which attachment (partial match OK). Optional if there is only one. | |
| uidvalidity | No | UIDVALIDITY reported alongside the uid. Pass it back so a mailbox resync cannot make this act on the wrong message. | |
| include_inline | No | Also consider inline images and PGP keys, which are hidden by default. A filename no document matches is looked for among them anyway. |