List or download attachments
get_attachmentsLists email attachments with type, size, and fetch permission, then retrieves selected files — inline for small text/images or saved to disk for larger ones.
Instructions
Without part_id: lists the attachments of a message with their type, size and whether the policy allows fetching them. With part_id: returns that one attachment. Small text and images come back inline so you can read them; anything larger is written to the download directory and you get the path. part_id must come from a listing call of this same tool. Executables are refused even when they claim to be something else — including when writing to disk.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | IMAP UID of the message, as returned by the listing tools. | |
| mode | No | "auto" (default) reads small text and images inline and saves the rest to disk; "inline" always returns the content; "file" always saves it. | |
| mailbox | No | Mailbox (folder) name exactly as returned by list_mailboxes, e.g. "INBOX" or "INBOX/Archive". Defaults to the configured mailbox. | |
| part_id | No | MIME part id from a previous listing call. Omit to list the attachments. |