Search emails
search-emailsFind emails by combining sender, recipient, subject, body text, folder, date range, unread status, or attachment filters to locate specific messages.
Instructions
[Email] Find emails by from (part of a sender's name or address), to (part of a To or Cc recipient), subject (words or part of the subject) and text (words in the body), combined with AND, optionally inside one folder and a since/until range. At least one of from, to, subject or text is required. Answers one page, newest first, in the same shape as list-emails: page with nextPage while hasMore is true. from, to and subject match synced headers. text is passed to the mail server's own search, whose matching varies by provider (Gmail matches whole words, most servers substrings) and which only covers the folders listed in bodySearch.searched — finding nothing is not proof an email does not exist.
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-emails"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Part of a To or Cc recipient's name or address | |
| from | No | Part of a sender's name or address, e.g. "acme.com" or "Maria" | |
| page | No | 1-based page, newest first | |
| text | No | Words in the email body, searched by the mail server | |
| limit | No | How many emails to return in this page | |
| since | No | Only emails received at or after this date | |
| until | No | Only emails received at or before this date. Pass back `window.until` when paging. | |
| folder | No | Folder path from list-mail-folders. Omit to search every synced folder. | |
| unread | No | true for unread emails only | |
| subject | No | Words in the subject, or part of it | |
| hasAttachments | No | true for emails with attachments only |