search_emails
Find Proton Mail messages with combined filters for query, folder, sender, recipient, subject, date range, unread status, and attachments; results sorted newest first.
Instructions
Search messages, newest first. All filters combine with AND.
Args: query: Full-text across headers and body; empty matches everything. folder: Folder or label name to search in, as returned by list_folders. limit: Maximum number of messages to return (1-100). sender: Substring match on the From header. recipient: Substring match on the To header. subject: Substring match on the Subject header. since_days: Only messages received in the last N days. before_days: Only messages received before N days ago. unread_only: Only unread messages when true. has_attachment: Only messages carrying an attachment. IMAP cannot search on this, so up to 200 newest candidates are checked with BODYSTRUCTURE; the result reports how many were scanned and whether the set was truncated.
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 |
|---|---|---|---|
| limit | No | ||
| query | No | ||
| folder | No | INBOX | |
| sender | No | ||
| subject | No | ||
| recipient | No | ||
| since_days | No | ||
| before_days | No | ||
| unread_only | No | ||
| has_attachment | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scanned | No | ||
| messages | No | ||
| truncated | No |