list_messages
List email messages from a mailbox with filters for direction, full-text search, trash, or custom folder to retrieve exactly the messages you need.
Instructions
List messages (one row per thread) for a mailbox. Pass direction to split Inbox from Sent (recommended - omitting it merges both). Pass q for full-text search over subject/from/to/body.
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": {
"mailbox": "<mailbox>"
},
"name": "list_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Full-text search query | |
| limit | No | Max messages to return, default 50 | |
| trash | No | true to view Trash instead of the active mailbox | |
| folder | No | A folder id (from list_folders) to view a custom folder instead | |
| mailbox | Yes | Full mailbox address, e.g. hello@example.com | |
| direction | No | inbound = received, outbound = sent |