ingest_email
Store ONE e-mail in a mailbox of this tenant without contacting any mail server — for simulations and for the local Thunderbird bridge. Nothing is sent or fetched. Idempotent per mailbox on message_id (a second call with the same message_id returns the stored mail). Without message_id a stable id is derived from sender, subject, date and body. email_account_id defaults to the tenant's first mailbox; the mailbox needs no credentials. Required: from_address. body is stored in full (get_email returns it); body_preview keeps the first 4000 characters. status 'new'. Returns { ingested, email_id, email_account_id, message_id }.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"from_address": "<from_address>"
},
"name": "ingest_email"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Plain-text body (stored in full) | |
| date | No | ISO-8601; default now | |
| folder | No | Mail folder (default INBOX) | |
| subject | No | Subject line | |
| from_name | No | Sender display name | |
| message_id | No | RFC Message-ID; de-dupe key per mailbox | |
| to_address | No | Recipient email address | |
| from_address | Yes | Sender email address | |
| has_attachments | No | Whether the mail has attachments | |
| email_account_id | No | Mailbox (default: the tenant's first mailbox) |