search_messages
Search an IMAP folder for messages by sender, subject, text, or date filters, and retrieve headers newest first without marking messages as read.
Instructions
Search a folder and return message headers, newest first.
Dates are YYYY-MM-DD and IMAP compares by day only. 'text' is a server side substring search across the whole message and its behaviour varies by server. include_snippet=True adds the first 200 characters of each body, which means downloading every match, so keep the limit small when using it. raw_criteria takes a raw IMAP search string and overrides the other filters. Reading never marks anything as seen.
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": "search_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | ||
| limit | No | ||
| since | No | ||
| before | No | ||
| folder | No | INBOX | |
| offset | No | ||
| unseen | No | ||
| account | No | ||
| flagged | No | ||
| subject | No | ||
| to_address | No | ||
| from_address | No | ||
| raw_criteria | No | ||
| include_snippet | No |