get_attachment_content
Retrieve attachment metadata or base64-encoded content from Proton Mail emails for in-memory processing. Get attachment details without saving to disk, or fetch the payload directly.
Instructions
Fetch metadata for a specific email attachment and optionally return its base64-encoded content inline. Use when you need to read or process attachment data in-memory. Set includeBase64:false (default) to retrieve metadata only without loading the full payload. Prefer save_attachment to write the file to disk 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": {
"emailId": "<emailId>",
"attachmentId": "<attachmentId>"
},
"name": "get_attachment_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| saveTo | No | Relative path within PROTONMAIL_ALLOW_FILE_DOWNLOAD_DIR to save attachment to disk. Returns file path and size instead of inline base64. Requires env var to be set. Set PROTONMAIL_MAX_INLINE_BYTES (in KB, default 40) to configure the inline size threshold. | |
| 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. | |
| includeBase64 | No | Include base64 payload in the response. |