Skip to main content
Glama

send_mail

Destructive

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.

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.

Input Schema

TableJSON 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). 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. 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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."
  2. 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)."
  3. First observedv0.1.3

TDQS

A4.4/5.0
Behavior5/5

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

Discloses a great deal beyond the annotations: two-phase human approval via Windows Hello/Touch ID, out-of-band console/CLI/Telegram approval, argument binding to the approved payload, expiry, deduplication, a 20/hour cap returning status=rate_limited, audit logging, preview contents, and that the action is irreversible once sent. All of this is consistent with destructiveHint=true and idempotentHint=false, so nothing contradicts the annotations.

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

Conciseness4/5

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

Front-loads the core action and the critical TWO-PHASE, HUMAN-APPROVED constraint, which is what an agent most needs to know first. It is dense with operational detail (rate limit, dedup, audit log) that is justified for a destructive send, though a couple of clauses could be trimmed.

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?

With no output schema, the description carries the full burden of explaining returns and does so: first-phase status=approval_required with preview, and the execution result shape {success, provider_result {requested, accepted, ...}} with the SMTP vs Graph difference. Nothing needed to call it correctly is missing.

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

Parameters3/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 every parameter including request_id, attachments, to, and body. The description reinforces a few nuances (recipient addresses shown as raw addresses with may_expand, signature auto-appended) but mostly restates what the schema provides, so the baseline 3 applies.

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?

States a specific verb and resource ('Send a new email from the user's account'). The word 'new' implicitly distinguishes it from the sibling reply_mail, and the two-phase framing sharpens what kind of send this is without requiring the schema.

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?

Gives clear context for how and when to invoke it: first call without request_id, second call with it after human approval, plus rate/expiry behavior. It does not explicitly route the agent to reply_mail as the alternative for replying, so it stops short of full when-not guidance.

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