Full-Text Search (Local Index)
fts_searchPerform keyword search over locally-indexed mail with BM25 ranking. Supports phrases, boolean operators, prefix matching, and column filters for precise email retrieval.
Instructions
BM25-ranked keyword search over the locally-indexed mail corpus. Supports FTS5 syntax: phrases ("exact phrase"), boolean (foo AND bar, foo OR bar, NOT baz), prefix (proto*), and column filters (subject:invoice from:alice). Faster and smarter than search_emails, but requires the local index to be built — call fts_rebuild if fts_status shows it empty.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max hits to return (1–200, default 20) | |
| query | Yes | FTS5 query string | |
| folder | No | Restrict results to a single folder | |
| account_id | No | Optional account ID to route this call to (multi-account configs). Omit to use the active account. Configured account IDs are listed in the settings UI (Accounts tab). | |
| sinceEpoch | No | Filter to messages whose date is at or after this Unix-epoch second |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hits | Yes |