get_attachment_text
Extract plain text from text-like email attachments, including CSV, JSON, XML, Markdown, and HTML-stripped content, without handling base64 encoding. Works up to 512KB; use binary methods for PDFs or images.
Instructions
Extract plain text from a text-like attachment (text/plain, text/csv, text/markdown, application/json, application/xml, text/html stripped of markup, text/calendar summarized) without dealing with base64 encoding. Not gated by the smaller inline-base64 size limit that get_attachment_content uses — bounded separately at 512KB of raw content. Fails clearly for non-text formats (e.g. PDF, images) — use get_attachment_content or save_attachment for those.
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": {
"emailId": "<emailId>",
"attachmentId": "<attachmentId>"
},
"name": "get_attachment_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| emailId | Yes | Composite email id in FOLDER::UID format, as returned by get_emails or search_emails. | |
| attachmentId | Yes | Stable attachment id returned by list_attachments. |