list_emails
List messages in this farm's QuailOS Email Assistant inbox (the mailbox the farm connected in Office > Email Assistant: Forwarding Bridge and/or IMAP accounts). Newest first. Owner/admin AI keys only. Returns id, threadId, from, subject, snippet, date, folder, read flag. Page with nextCursor passed back verbatim with the same filters.
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": {
"farmId": "<farmId>"
},
"name": "list_emails"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max messages to return (1-50, default 20) | |
| query | No | Optional case-insensitive text match on subject, sender, recipients and snippet (max 200 chars) | |
| since | No | Optional ISO date/datetime: only messages on/after this time | |
| until | No | Optional ISO date/datetime: only messages on/before this time (a bare YYYY-MM-DD includes that whole day, UTC) | |
| cursor | No | Optional: the nextCursor string from the previous list_emails response, passed verbatim with the same filters | |
| farmId | Yes | The unique farm ID | |
| folder | No | Folder to list (default INBOX). ALL = every folder. | |
| unreadOnly | No | Only unread messages |