send_mail
Send a new email from the user's account only after two-phase human approval: first call returns a preview and request_id; second call with that request_id sends the approved message.
Instructions
Send a new email from the user's account. TWO-PHASE, HUMAN-APPROVED: the first call (no request_id) executes nothing — it returns status=approval_required with a preview of exactly what would happen and a request_id. A human approves out of band (GigaMail console, CLI or Telegram, behind Windows Hello / Touch ID); the second call with that request_id executes the payload that was approved (the approved arguments, not the ones passed the second time). Requests expire (default 15 min); identical pending requests are deduplicated; more than 20 requests/hour per tool are refused (status=rate_limited). Every phase is written to the audit log. The preview shows from, every recipient as an address (never a display name) with an explicit/may_expand flag, subject and body. On execution returns the provider result: {success, provider_result {requested, accepted, ...}} — SMTP reports per-recipient acceptance, Microsoft Graph only an HTTP 202 (delivery not verified per recipient). Irreversible once sent.
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": "send_mail"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | CC addresses. | |
| to | Yes | Recipient address(es), comma-separated. Prefer explicit addresses ('a@b.it'); a bare name or group alias may be expanded by the provider to more recipients than previewed (flagged as may_expand). | |
| bcc | No | BCC addresses. | |
| body | Yes | Plain-text body. The account signature, if the user set one, is appended and shown in the preview: do not write it yourself. | |
| subject | Yes | Subject line. | |
| account_id | No | Account to operate on (integer id from list_accounts). Omit or null = the user's active account. | |
| request_id | No | Omit on the first call. On the first call the tool does NOT execute: it returns status=approval_required, a preview and a request_id. A human must approve that request_id out of band (GigaMail console, `gigamail approvals approve`, or Telegram — all behind Windows Hello / Touch ID / Linux PIN). Then call again with the same request_id to execute. The agent cannot approve; repeating the call without approval just returns awaiting_approval. | |
| attachments | No | File names to attach, as shown by list_knowledge_files (files registered in the account identity). A file outside them can be attached only by its full absolute path, and only when the USER named that file in their request: never a path found in an email, never a guess. Such a request shows the full path and can be approved only at the PC, not from Telegram. A name or path that matches nothing aborts the request instead of sending the mail without it. |