Skip to main content
Glama

send_mail

Destructive

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

NameRequiredDescriptionDefault
ccNoCC addresses.
toYesRecipient 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).
bccNoBCC addresses.
bodyYesPlain-text body. The account signature, if the user set one, is appended and shown in the preview: do not write it yourself.
subjectYesSubject line.
account_idNoAccount to operate on (integer id from list_accounts). Omit or null = the user's active account.
request_idNoOmit 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.
attachmentsNoFile 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.6.8
    • changedInput schema / properties / attachments / description
      Previous value: -"File names to attach, as shown by list_knowledge_files. ONLY files registered in the account identity can be attached: an arbitrary path is not accepted. A name that matches nothing aborts the request instead of sending the mail without it."New value: +"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."
    • changedInput schema / properties / request_id / description
      Previous value: -"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). Then call again with the same request_id to execute. The agent cannot approve; repeating the call without approval just returns awaiting_approval."New value: +"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."
  2. Changed1 schema field changedv0.5.2
    • changedInput schema / properties / body / description
      Previous value: -"Plain-text body, sent as-is."New value: +"Plain-text body. The account signature, if the user set one, is appended and shown in the preview: do not write it yourself."
  3. Changed8 schema fields changedv0.3.0
    • addedInput schema / properties / account_id / description
      Added value: +"Account to operate on (integer id from list_accounts). Omit or null = the user's active account."
    • addedInput schema / properties / attachments
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "File names to attach, as shown by list_knowledge_files. ONLY files registered in the account identity can be attached: an arbitrary path is not accepted. A name that matches nothing aborts the request instead of sending the mail without it.",
      +  "title": "Attachments"
      +}
    • addedInput schema / properties / bcc / description
      Added value: +"BCC addresses."
    • addedInput schema / properties / body / description
      Added value: +"Plain-text body, sent as-is."
    • addedInput schema / properties / cc / description
      Added value: +"CC addresses."
    • addedInput schema / properties / request_id / description
      Added value: +"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). Then call again with the same request_id to execute. The agent cannot approve; repeating the call without approval just returns awaiting_approval."
    • addedInput schema / properties / subject / description
      Added value: +"Subject line."
    • addedInput schema / properties / to / description
      Added value: +"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)."
  4. First observedv0.1.3

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds extensive behavior beyond the annotations: two-phase human approval, non-execution on the first call, approval out of band, expiry, deduplication, rate limiting, audit logging, preview contents, and provider-specific acceptance semantics. It also correctly reinforces that the operation is irreversible once sent, consistent with destructiveHint=true.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but front-loaded and dense with necessary information for a high-risk send operation. Every major sentence carries operational meaning: approval flow, request behavior, preview semantics, and result interpretation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description compensates by explaining statuses such as approval_required and rate_limited, the preview contents, and the provider result shape. It gives an agent enough context to invoke this complex, destructive tool safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents parameters well. The description still adds important meaning, especially that the second call executes the approved arguments rather than the ones passed again, and it explains how recipients and attachments appear in the preview.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: send a new email from the user's account. The word 'new' also implicitly separates it from reply_mail without requiring schema inspection.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives strong procedural guidance: omit request_id on the first call, obtain human approval, then call again with the same request_id to execute. It does not explicitly name alternatives such as reply_mail, so it falls short of full when/when-not/alternatives guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.