List messages
list_messagesLists mailbox message headers—sender, subject, date, size, and ID—newest first, with paging and unread filtering; message bodies are omitted to avoid high token use.
Instructions
Lists the messages of a mailbox, newest first by the date the sender wrote, which also holds across pages. Returns headers only: sender, subject, date, size and the message id. It never returns message bodies, because a single message averages around 16000 tokens raw. Use get_message with an id to read one. Ordering reads one date per message in the mailbox, so a very large mailbox takes a moment; the answer says so when it does.
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 | How many messages to return, at most 100. | |
| offset | No | How many of the newest messages to skip. Used for paging. | |
| mailbox | No | The mailbox path, for example "INBOX", "Archive" or "Folders/Work". Use list_folders to see them. "All Mail" holds every message including discarded ones, and there the entries that are in the trash come back marked "in trash". | INBOX |
| unreadOnly | No | When true, only unread messages are listed. |