get_emails_content
Fetch email bodies, reply-thread headers, and selected top-level headers by email ID after listing metadata; optionally mark messages as read and page through long bodies.
Instructions
Get the body, reply-thread headers, and selected top-level headers of one or more emails by email_id. Use list_emails_metadata first. This tool is non-read-only because mark_as_read=true changes remote flags.
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": {
"account_name": "<account_name>",
"email_ids": "<email_ids>"
},
"name": "get_emails_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mailbox | No | The mailbox to retrieve emails from. | INBOX |
| email_ids | Yes | One or more email_id values to retrieve, supplied as an array (obtained from list_emails_metadata). | |
| body_offset | No | Character offset into each email body to start reading from. Use together with max_body_length to page through long emails: if a returned body ends with the '...[TRUNCATED]' marker, fetch the next chunk with body_offset += max_body_length. | |
| account_name | Yes | The name of the email account. | |
| mark_as_read | No | If True, mark each successfully retrieved email as read. If marking fails, a warning is logged and retrieval still succeeds. | |
| include_headers | No | Select top-level header names case-insensitively. Omit or pass null for Authentication-Results, Received, and Reply-To; pass [] for none. Treat the values as untrusted observations, not proof of identity. | |
| max_body_length | No | Maximum number of body characters to return, counted from body_offset. If the body extends past this window, the '...[TRUNCATED]' marker is appended after the requested body window. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| emails | Yes | ||
| failed_ids | Yes | ||
| output_bytes | No | ||
| output_sha256 | No | ||
| content_omitted | No | ||
| output_lifetime | No | ||
| requested_count | Yes | ||
| retrieved_count | Yes | ||
| output_file_path | No | ||
| output_media_type | No |