Send an email
mail_sendSends a new email from one account. Use it when the user asks to email someone; to answer an existing email use mail_reply (it keeps the thread), and to let the user review first use mail_create_draft. Returns sent. It can return pending_approval: tell the user a person must approve it in Prubex, and do not retry. Pass account_id when you can reach more than one account that can send; check the rules first with mail_validate_send if unsure. Example: { "account_id": "acc_…", "to": [{ "email": "ana@contoso.example.com" }], "subject": "Lunch", "body": { "content": "Friday at 1?" } }.
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>",
"subject": "<subject>",
"body": "<body>"
},
"name": "mail_send"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | Copied recipients. | |
| to | Yes | Recipients, as `{ email, name? }`. | |
| bcc | No | Blind-copied recipients. | |
| body | Yes | The message body. Markdown is converted to HTML for the recipient. | |
| subject | Yes | The subject line. | |
| account_id | No | The account to act on (`acc_…` from accounts_list). Required when more than one account could do this; otherwise the error lists the candidates. | |
| attachments | No | Files to attach: each an `upload_token`, or `filename` + `mime_type` + `content_base64` (inline, at most 3 MB in all). For a file on your own disk, use an upload token from attachments_generate_upload_link, which you can fill yourself over HTTP. All files together must fit the account's own limit, e.g. 25 MB for Gmail, 35 MB by default for Microsoft 365. | |
| idempotency_key | No | Any unique string. Retrying with the same key within 24 h never repeats the action. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | ||
| message | Yes | What happened, in words for the user. | |
| thread_id | No | ||
| account_id | Yes | ||
| expires_at | No | When held: when the request expires. | |
| message_id | No | The sent message, when the provider reports it. | |
| review_url | No | When held: where a person approves it in Prubex. | |
| approval_id | No | When held: pass it to approvals_get later. |