Email: List messages
email_list_messagesList email messages from the user's connected Gmail, Microsoft/Outlook OR generic IMAP mailbox. Use for a requested mailbox listing or to obtain email context for a cross-channel task. Use to find email_id before opening a message. For totals use email_list_folders (folder.total_count); IMAP pages are capped at 50 and listed live, keep limit small (20).
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": "email_list_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | ISO 8601 UTC datetime; only emails after it (exclusive). | |
| limit | No | ||
| before | No | ISO 8601 UTC datetime; only emails before it (exclusive). | |
| cursor | No | ||
| folder_id | No | Exact folder/label ID returned by email_list_folders/email_resolve_folder. Never pass a human folder name unless the provider returned it as the ID. Mailbox folder/label ID: Exact Gmail label, Outlook folder or IMAP folder id. Obtain with: email_list_folders -> folder.id Never pass: human folder name such as Inbox when an ID is required. | |
| account_id | No | Optional Nilyo connection ID (unipile_account_id from list_connected_accounts). Omit when the user has one account for this provider. When several exist, Nilyo never guesses: list them (display name, identifier, provider user ID), choose the one the user named or ask, and pass its ID here. |