Search Emails
email_searchSearch messages by content. Fulltext mode (default) substring-matches subject/body/addresses of EMAIL messages and returns {items, pagination} with cursor paging. Semantic mode ranks by vector-embedding similarity and returns {results} scored 0-1 — each result spans ANY channel (check the channel field) and includes the message id for email_get / email_thread_get follow-ups.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Search mode. `fulltext` (default) does substring matching over subject/body/addresses of EMAIL messages and supports cursor pagination. `semantic` ranks by vector-embedding similarity — better for meaning-level questions ("emails about the contract renewal") — but searches messages across ALL channels (each result carries a `channel` field) and does not paginate. | |
| limit | No | Max results (fulltext: 1-100, default 20; semantic: 1-50, default 10). | |
| query | Yes | Search query text. | |
| cursor | No | Pagination cursor from a previous fulltext response's `pagination.nextCursor`. Fulltext mode only. | |
| labels | No | Only return messages carrying ALL of these labels. System labels: `unread`, `read`, `archived`, `spam`. Case-insensitive. Use email_label to change them. | |
| agentId | No | Filter results to a specific agent. | |
| threshold | No | Minimum similarity score 0-1 (semantic mode only, default 0.7). | |
| includeSpam | No | Include messages classified as spam on arrival. Excluded by default. Naming `spam` in `labels` also counts as asking for it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||