list_emails
Retrieve recent emails from any IMAP folder, including Gmail, Outlook, and custom domains. Use header-only mode to scan subjects, senders, dates, and flags without downloading message bodies.
Instructions
List recent emails via IMAP from any folder — works with Gmail, Outlook, and custom domains. Use headerOnly=true for fast inbox scanning that returns only subject, sender, date, and flags without downloading message bodies.
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": {
"accountId": "<accountId>"
},
"name": "list_emails"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | The number of emails to retrieve (default: 10) | |
| folder | No | The folder to list emails from (default: INBOX) | |
| offset | No | Number of messages to skip from the newest (for pagination, default: 0) | |
| accountId | Yes | The ID of the account to use | |
| headerOnly | No | When true, skip body download and return only headers (subject, from, date, flags). Much faster for large mailboxes. snippet will be empty. Default: false. |