Search Emails
search_emailsSearch emails by subject, body, or sender across mailbox folders. Supports caching and optional folder filtering for personal or work accounts.
Instructions
📖 Search emails across mailbox (read-only, safe for unsupervised use)
Searches email subject, body, and sender across all or specific folders. Automatically routes to the appropriate API based on account type:
Personal accounts: Uses OData $search parameter
Work/school accounts: Uses unified search API
Args: query: Search query string (1-512 characters) account_id: Microsoft account ID limit: Maximum results to return (1-500, default: 50) folder: Optional folder to search within (e.g., "inbox", "sent") use_cache: Whether to use cache (default: True) force_refresh: Bypass cache and fetch fresh data (default: False)
Returns: List of matching emails with metadata
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| account_id | Yes | ||
| limit | No | ||
| folder | No | ||
| use_cache | No | ||
| force_refresh | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |