search_emails
Search mailbox folders by sender, subject, text, or date range to find receipts and invoices. Returns matching email IDs and metadata for follow-up reading.
Instructions
Search for emails in a folder.
Args: folder: Mailbox folder to search (default 'INBOX'). Use list_folders() to see all available folders. Common: INBOX, Sent, Trash, [Gmail]/All Mail, Bulk (Yahoo spam), Archive. from_address: Filter by sender email address. subject_contains: Filter by text in the subject line. body_or_subject: Search for text in the subject OR body. since_date: Only emails on or after this date (YYYY-MM-DD). before_date: Only emails before this date (YYYY-MM-DD). limit: Max results to return (default 50, newest first).
Returns a JSON list of {id, date, from, subject} for matching emails. Use read_email() with the id to get the full content.
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 | ||
| folder | No | INBOX | |
| since_date | No | ||
| before_date | No | ||
| from_address | No | ||
| body_or_subject | No | ||
| subject_contains | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |