List emails
list-emailsList email metadata newest first, one page at a time, filtered by folder, date range, unread, flagged, or attachments; excludes bodies and supports result paging.
Instructions
[Email] List one page of emails, newest first: sender, recipients, subject, date, read state and attachment names — no body. Pass folder (a path from list-mail-folders) to list one folder; without it every synced folder this token may read is listed, and an email filed in several folders appears once with each folder in folders. Filter with since/until, unread, flagged and hasAttachments. A response is one page: when hasMore is true call again with nextPage and otherwise the same arguments (including window) until hasMore is false before summarising. covered is the span this page actually covers; totalMatching counts the emails in the request. Pass an emailId to read-email for the text. To find emails by sender, subject or words, use search-emails instead of paging.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list-emails"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | 1-based page, counting back from the newest. Walk this up while `hasMore` is true. | |
| limit | No | How many emails to return in this page | |
| since | No | Only emails received at or after this date, e.g. 2024-03-01 or 2024-03-01T12:00:00Z | |
| until | No | Only emails received at or before this date. Pass back `window.until` from a previous page when paging a range. | |
| folder | No | Folder path from list-mail-folders, e.g. "INBOX". Omit for every synced folder. | |
| unread | No | true for unread emails only, false for read ones only | |
| flagged | No | true for flagged (starred) emails only | |
| hasAttachments | No | true for emails with attachments only |