Search
MoMail performs vector semantic search over ingested mail using Workers AI embeddings and Vectorize. Use either:
- REST:
POST /v1/api/searchwith the same JSON body as the MCP tool input - MCP:
search_emailson/v1/mcp
REST: POST /v1/api/search
Section titled “REST: POST /v1/api/search”POST /v1/api/searchAuthorization: Bearer mk_...Content-Type: application/json
{ "query": "invoice from Acme last week", "mailbox_id": "optional-uuid", "limit": 10}Response: { "success": true, "results": [...], "total": number }
MCP endpoint
Section titled “MCP endpoint”MCP server URL (StreamableHTTP):
https://momail.io/v1/mcpAuthentication: Authorization: Bearer <api-key> on MCP requests. Setup: Claude Desktop, MCP Overview.
Tool: search_emails
Section titled “Tool: search_emails”Natural language and structured filters; results ranked by vector similarity.
Input (summary)
Section titled “Input (summary)”| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Natural language search query |
mailbox_id | string | No | Limit to one mailbox |
from | string | No | Sender filter |
to | string | No | Recipient filter |
subject | string | No | Subject contains |
date_from | string | No | ISO 8601 lower bound |
date_to | string | No | ISO 8601 upper bound |
limit | number | No | 1–100 (default 10) |
offset | number | No | Pagination offset (default 0) |
Full schema and examples: MCP Tools — search_emails.
Typical agent flow
Section titled “Typical agent flow”list_mailboxes— discover mailbox idssearch_emails— find relevantemail_id/ snippetsget_emailorget_email_thread— full contentget_email_raworGET /v1/api/emails/{messageId}/raw— original MIME if needed
Query examples
Section titled “Query examples”| Query | Finds emails about… |
|---|---|
invoices from last month | Recent billing messages |
meeting notes with the design team | Meeting summaries |
urgent issues requiring attention | High-priority threads |
project delays and timeline updates | Schedule changes |
Understanding scores
Section titled “Understanding scores”Result objects include a similarity score (higher = better match). Thresholds are approximate:
| Score | Relevance |
|---|---|
| 0.90–1.00 | Highly relevant |
| 0.70–0.89 | Very relevant |
| 0.50–0.69 | Moderately relevant |
| Below 0.50 | Weak match |
Rate limits
Section titled “Rate limits”MCP calls share the same per-user rate limits as /v1/api/*. See Rate limits.
REST alternative for raw bytes only
Section titled “REST alternative for raw bytes only”Search is MCP-only; downloading raw MIME is available via REST:
GET /v1/api/emails/{messageId}/rawSee Emails (raw MIME).
MCP Tools Reference Complete tool parameters and examples