read_attachment
Extracts text from text-like email attachments such as TXT, CSV, JSON, XML, calendar, and sanitized HTML; returns only metadata for other file types, indicating when saving is needed.
Instructions
Return the text of a text-like attachment (txt, csv, json, xml, calendar, HTML after sanitising). For other types it returns only the attachment's details; use save_attachment to write those to disk.
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": {
"folder": "<folder>",
"uidvalidity": "<uidvalidity>",
"uid": "<uid>",
"part_id": "<part_id>"
},
"name": "read_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | The message's uid from search_messages. | |
| folder | Yes | Folder name exactly as list_folders or search_messages returned it. | |
| offset | No | Start this many characters in, to continue a long attachment. | |
| part_id | Yes | The attachment's part_id from read_message. | |
| max_chars | No | Most characters to return (default 12000, at most 50000). | |
| uidvalidity | Yes | The uidvalidity that search_messages returned for this folder. |