Get Email Thread
get_threadRetrieve all related messages in an email thread by using the normalized subject line to group messages from INBOX and Sent folders. Useful for summarizing long conversations.
Instructions
Return all messages that look like they belong to the same thread as the given email. Uses the normalized Subject (Re:/Fwd: stripped) to collect related messages from INBOX + Sent. Folder-restricted agents only receive messages from their allowed folders. Useful for summarising long conversations in one call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | No | Folder the seed message lives in. Providing this avoids UID collisions across folders. | |
| email_id | Yes | IMAP UID of any message in the thread | |
| account_id | No | Optional account ID to route this call to (multi-account configs). Omit to use the active account. Configured account IDs are listed in the settings UI (Accounts tab). | |
| max_messages | No | Max messages to return (default 50, cap 200) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| subject | Yes | Normalized subject line for the thread | |
| messages | Yes | Messages in the thread, oldest-first |