export_thread
Save a whole email thread to a local file in markdown or JSON for keeping, sharing, or reading long conversations without loading them into context.
Instructions
Write a whole thread to a local file instead of returning it — for keeping, sharing, or reading a long conversation without loading it into the context. markdown (default): one section per message with From/To/Date/Subject and attachment names as inline code (never rendered as a link or image), sender authentication and the attachment list, and the body in a code fence that the message text cannot close (HTML-only mail is reduced to text). json: the parsed messages as get_thread returns them, HTML included. Both formats strip the same hidden characters (zero-width, bidi controls) as every tool result. Attachments are listed, not saved — use download_attachment for those. If MAILWARDEN_DOWNLOAD_DIR is set, destPath is resolved inside (and restricted to) that directory, as for attachments. The file holds mail text as the sender wrote it: untrusted content, now on disk. USE WHEN: the user wants a conversation saved or handed on, or a thread is too long to read in one piece. DO NOT USE: to read a thread (use get_thread). SIDE EFFECTS: writes a local file; never overwrites — an existing file gets a numeric suffix. The response's 'saved' field is the path actually used. Mailbox unchanged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | markdown | |
| destPath | Yes | ||
| threadId | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bytes | Yes | ||
| saved | Yes | ||
| messageCount | Yes |