List messages
list_messagesList email messages in a Proton Mail folder newest first, returning subject, sender, date, flags and total, with cursor-based paging for additional pages.
Instructions
List messages in a folder, newest first by date. Returns subject, sender (recipient for mail the account sent to others), date and flags for each message, and the folder's total. A non-selectable namespace container (e.g. Folders/Labels) is rejected with an actionable error rather than returning an empty list.
Paging: when there are more messages the result ends with a cursor value; pass it back unchanged to get the next page. Pages follow date order exactly, with nothing skipped or repeated. (UID order is not date order on Proton Bridge, which is why paging is not by UID.)
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_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of messages to return (default: 20, max: 100) | |
| cursor | No | Continue from a previous page: pass the `cursor` value that page ended with, unchanged. | |
| folder | No | Folder path to list messages from (default: INBOX) | INBOX |
| beforeUid | No | Only messages with a UID below this value. With `sortByUid: true` this is how to page (the result names the next value); in date order use `cursor` instead. | |
| sortByUid | No | Order by UID descending instead of by date, and page with `beforeUid`. UIDs reflect when a message was added to this folder, which on Proton Bridge is unrelated to its date, so this is rarely what you want. Default false (date order). | |
| includeSnippet | No | Append a ~200-char body preview to each row. Adds one fetch per message; default off. |