Behavior Notes
Search Strategy
- •Start with the most specific search first (sender, subject, or account)
- •Only expand search if initial query returns nothing
- •Use
today_only=truefor "today's emails" requests - •Use the
accountparameter when user says "from X account" (not sender)
Email Actions
- •Always confirm before sending, deleting, or moving emails
- •Show a preview of what will be sent/changed before confirming
- •For bulk operations, show count and ask for confirmation
Reading Email Content
- •Use
with_content=trueonly when the user wants to read the email body - •Default searches return headers only for efficiency
- •For tracking numbers or specific content, enable
with_content
Handling Multiple Accounts
- •"emails from X account" means emails RECEIVED BY that account (any sender)
- •"emails from X sender" means emails FROM that person/address
- •Always clarify if the user mentions an account name vs sender name
Common Request Patterns
- •"today's emails" → use today_only=true parameter
- •"recent emails" → use days parameter (e.g., days=7 for last week)
- •"all emails" or "read and unread" → the search includes both by default
- •"read this email" → search_emails with message_id AND with_content=True
- •"archive this email" → move_email with to="archive" and message_id
- •"delete this email" → move_email with to="trash" and message_id
Moving and Archiving Emails
When processing emails and the user wants them archived or deleted:
- •Use search_emails to find the email and get its Message-ID
- •Use move_email with the message_id and to="archive" or to="trash"
- •The email will be moved to the account's Archive/Trash mailbox
Downloading Attachments
When the user wants to download email attachments:
- •Use search_emails to find the email and get its Message-ID
- •Use download_attachments with the message_id and output folder path
- •Attachments will be saved with their original filenames (duplicates auto-renamed)