get-message
Read the full body of one email when you already have its message ID, returning subject, text or HTML body, RFC Message-ID, and sent/received dates; include mailbox and account for reliable reads.
Instructions
Use when: reading the full body of one message whose id you already have (numeric or imap:…); set preferHtml to get the HTML body instead of plain text. Returns: the message subject, body (plain text by default, HTML when preferHtml is true), its stable RFC Message-ID (rfcMessageId) for dedup/threading, and two dates: dateSent (the author's Date: header — survives a migration/re-import) and dateReceived (arrival in the mailbox; this is the one a migration resets). Tip: pass the mailbox+account you got the id from (e.g. from search-messages) to fetch it directly — required for reliable reads of large folders like "Sent Items", which otherwise time out. Do not use when: you don't yet have an id (use search-messages or list-messages first), you want the whole conversation (use get-thread), or you need the raw headers / Received: trace (use get-message-headers).
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": {
"id": "<id>"
},
"name": "get-message"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| account | No | Account that holds the message. Pair with `mailbox` for a direct, scan-free fetch. | |
| mailbox | No | Mailbox that holds the message (e.g. "Sent Items"). Numeric ids are unique per mailbox; supplying this (with account) opens that mailbox directly instead of scanning every mailbox, which is required to read large folders like Sent Items without timing out. | |
| preferHtml | No | Return the HTML body (extracted from the message source) instead of plain text |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| body | No | ||
| isHtml | No | ||
| subject | No | ||
| dateSent | No | ISO 8601 send time from the message's Date: header (Mail's `date sent`). Absent when the message carries no parseable Date: header, or when the value is more than 7 days later than dateReceived — a send time after arrival is not a real one. | |
| dateReceived | No | ISO 8601 arrival time in the mailbox (IMAP INTERNALDATE / Mail's `date received`). A migration or re-import resets this; compare with dateSent. | |
| rfcMessageId | No | Stable RFC 5322 Message-ID (angle brackets stripped); empty when the message has none |