Send an email
mail_send_messageSend text and/or HTML from an explicitly authorized agent mailbox. Omit inbox_id when the OAuth grant contains one inbox; otherwise call mail_list_inboxes first. Send at most 10 attachments and at most 10 MiB (10485760 bytes) of original decoded file data in total. PDF, XLSX, DOCX and other file types are supported. Prefer mail_prepare_attachment_uploads plus attachment_ids when the runtime can upload raw files. For the legacy inline path, provide filename, content_type and the exact original bytes encoded once as standard padded RFC 4648 content_base64; Base64 transport overhead does not count toward the 10 MiB limit. Do not send a local path, data: URL or Markdown, and never alter, summarize or recreate file content. For the lowest latency, encode each original file once and make one tool call. Optional size and sha256 should be included only when the client can calculate them locally; never guess them. The server allows an intentionally encrypted attachment or an unsupported RAR/7z archive to be sent, marks it unscannable_encrypted or unscannable_archive and returns an explicit warning that its contents could not be inspected. The same recipient allowlist, atomic hourly/daily/monthly quotas, antispam, malware scanner and tier limits as the namailu Agent API are enforced. idempotency_key is required. When a limit is reached nothing is sent and the result carries code rate_limited or monthly_quota_exceeded, a message saying when sending is possible again, retry_after_seconds and retry_at (UTC). Tell the user that time and do not retry before it; scope=burst is only a pause of a few seconds.
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": {
"to": "<to>",
"idempotency_key": "<idempotency_key>"
},
"name": "mail_send_message"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | One recipient address or an array of recipient addresses. Every recipient must pass the mailbox allowlist and consumes one quota unit. | |
| html | No | Optional HTML body. Do not omit the plain-text fallback in text. | |
| text | No | Plain-text body; include it as a fallback when sending HTML. | |
| subject | No | Email subject. Supply a meaningful subject unless the user requests none. | |
| inbox_id | No | Authorized sender inbox ID. Omit it when the grant has exactly one inbox; otherwise use an ID returned by mail_list_inboxes. Never invent an ID. | |
| attachments | No | Optional original files. At most 10 attachments and 10 MiB (10485760 bytes) of decoded original data in total, before Base64 expansion. All outgoing file types are accepted unless malware or unsafe active content is detected; encrypted files and RAR/7z archives are sent with an explicit unscannable warning. | |
| attachment_ids | No | Preferred staged binary attachments returned by mail_prepare_attachment_uploads after every raw PUT succeeded. The IDs are bound to this OAuth grant, sender inbox and idempotency_key. Use either attachment_ids or legacy inline attachments, never both. | |
| idempotency_key | Yes | Stable business-operation key. Retry the identical request with the same key; use a fresh key when any message content changes. | |
| openpgp_ciphertext | No | Optional ASCII-armored OpenPGP ciphertext. It is single-recipient and cannot be combined with text, html or attachments. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| to | Yes | ||
| ids | Yes | ||
| status | Yes | ||
| warnings | No | Explicit security caveats. A sent result with an unscannable warning is not evidence that the encrypted or unsupported archive contents were clean. | |
| encryption | No | ||
| recipients | Yes | ||
| attachments | Yes | ||
| recipient_count | Yes |