Search messages
search_messagesSearch a mailbox folder by free text and/or structured filters (from, to, subject, body, date range, attachments). At least one filter is required. Returns message summaries with uids.
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": "search_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Free-text query (searches headers and body) | |
| to | No | Match recipient | |
| body | No | Match body text | |
| from | No | Match sender | |
| folder | No | IMAP folder name (default "INBOX") | |
| mailbox | Yes | Full mailbox address, e.g. "support@yourdomain.com" | |
| subject | No | Match subject | |
| dateAfter | No | Only messages after this date (ISO 8601) | |
| dateBefore | No | Only messages before this date (ISO 8601) | |
| hasAttachment | No | Only messages with attachments |