Search Emails
search_emailsInput Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of results (default 50, max 200). Only override if user says specific number like "show me 10 emails". For vague quantities ("couple", "few", "recent"), omit this parameter to use default. | |
| offset | No | Rows to skip for paging (default 0). When the result is truncated, re-call with offset += limit to fetch the next page. | |
| order_by | No | SQL ORDER BY clause (default: email_datetime DESC) | email_datetime DESC |
| as_teammate | No | Read a consented teammate's emails instead of your own — pass their email. Gated on that teammate's conversation-sharing setting; a teammate who hasn't shared is rejected. Omit for your own. | |
| where_clause | Yes | SQL WHERE clause (without WHERE keyword). Use ONLY these columns: provider, sender_email, sender_email_lower (WHERE only; not returned; pass lowercased values), sender_name, recipients, is_outbound (BOOLEAN — true = sent from the connected mailbox, false = received), subject, content, email_datetime, attachments, reply_outcome (inbound replies only; '' / 'interested' / 'meeting_booked' / 'not_interested' — the reply's classified outcome). For participants, use sender_email_lower = ANY(ARRAY['foo@example.com', ...]). Resolve the email address first if you only have a name. For attachments JSONB, use: attachments::text ILIKE '%filename%' or attachments != '[]'::jsonb to find emails with attachments. |