get_attachment_content
Read attachment content inline without saving to disk. Inspect text files, JSON, or small PDFs during email triage workflows.
Instructions
Read one attachment's content inline, without writing it to disk.
For "triage" workflows where you want to inspect an attachment (a text
file, JSON, a small PDF) before deciding what to do with it — instead of
save_attachments → read the file → clean up.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Mail.app account name or UUID. Supply it (with ``mailbox``) to use the faster IMAP path; pass the same value you read the message with so the attachment ordering matches. | |
| mailbox | No | Folder the message lives in (for the IMAP path). | |
| message_id | Yes | Message id, as returned by ``search_messages`` / ``get_messages`` (RFC 5322 Message-ID on the IMAP path, Mail's internal id on the AppleScript path). | |
| attachment_index | Yes | 0-based index into the message's attachments, in the same order ``get_attachments`` / ``get_messages`` (``include_attachments=True``) report them. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||