Skip to main content
Glama

Send an email

mail_send_message
DestructiveIdempotent

Send 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

NameRequiredDescriptionDefault
toYesOne recipient address or an array of recipient addresses. Every recipient must pass the mailbox allowlist and consumes one quota unit.
htmlNoOptional HTML body. Do not omit the plain-text fallback in text.
textNoPlain-text body; include it as a fallback when sending HTML.
subjectNoEmail subject. Supply a meaningful subject unless the user requests none.
inbox_idNoAuthorized 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.
attachmentsNoOptional 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_idsNoPreferred 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_keyYesStable business-operation key. Retry the identical request with the same key; use a fresh key when any message content changes.
openpgp_ciphertextNoOptional ASCII-armored OpenPGP ciphertext. It is single-recipient and cannot be combined with text, html or attachments.

Output Schema

NameRequiredDescriptionDefault
idYes
toYes
idsYes
statusYes
warningsNoExplicit security caveats. A sent result with an unscannable warning is not evidence that the encrypted or unsupported archive contents were clean.
encryptionNo
recipientsYes
attachmentsYes
recipient_countYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (destructive/openWorld/idempotent), the description discloses quota structure (atomic hourly/daily/monthly), the recipient allowlist, antispam, malware scanning, the unscannable_encrypted/unscannable_archive marking and warning, and the concrete failure payload (code rate_limited or monthly_quota_exceeded, retry_after_seconds, retry_at in UTC). That is exactly the behavior an agent needs before attempting a destructive send, and it does not conflict with 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.

Conciseness3/5

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

It is front-loaded with the action and the inbox rule, but it is a dense single paragraph that repeats schema-level constraints (never alter/summarize content, no data: URL or Markdown, size/sha256 only when locally computable). Those repeated sentences do not earn their place against a 100%-covered schema, and the lack of any structure makes the failure-handling tail easy to miss.

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?

For a destructive, quota-metered send tool with 9 parameters and an output schema, the description covers both attachment paths, the size limits, the authorization/allowlist prerequisites, and the rate-limit recovery contract. An agent has everything needed to decide whether to call it, how to build the payload, and what to do on a limit error.

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 per-field docs already carry the baseline. The description still adds cross-parameter meaning the schema does not: the mutually exclusive choice between attachment_ids and inline attachments, the aggregate 10-attachment/10 MiB budget measured on decoded bytes, and the instruction to encode each file once and make a single call for latency. Minor overlap with schema wording (size/sha256, no data: URL) keeps it from a 5.

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 opening sentence names a specific verb and resource ("Send text and/or HTML from an explicitly authorized agent mailbox") and immediately scopes it to an authorized sender. It also distinguishes itself from siblings by naming mail_list_inboxes for inbox discovery and mail_prepare_attachment_uploads for the preferred attachment path.

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

Usage Guidelines5/5

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

It gives explicit when-to conditions (omit inbox_id only when the grant has exactly one inbox; otherwise call mail_list_inboxes first) and explicit path selection (prefer mail_prepare_attachment_uploads with attachment_ids when raw uploads are possible, use the legacy inline path otherwise). It also states a hard rule for rate limits: do not retry before retry_at, and notes scope=burst is only a few-second pause.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.