Skip to main content
Glama

Send an email

send_email

Send an email from a verified workspace sender.

    Plain-text emails still have sending, delivery and bounce events.

    Without ``from_``, one verified custom domain takes priority over the Hail mail address.
    Several verified custom domains require an explicit ``from_`` address.
    A custom domain blocked from sending (``sends_enabled`` false, PATCH ``/v1/email-domains/{id}``) is skipped for picks and refuses an explicit ``from_``.
    When configured, a workspace without a sender receives a Hail mail address automatically.

    Hail does not verify consent.

    Returns the email ID, status, sender, recipients and ``idempotency_key``, or an error.
    

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>",
      "recipient_consent": "<recipient_consent>"
    },
    "name": "send_email"
  }
}

Input Schema

NameRequiredDescriptionDefault
ccNoEmail addresses to copy; every recipient sees them.
toYesEmail addresses of the people the message is for.
bccNoEmail addresses to copy in secret: they get the message, and no other recipient sees their addresses.
from_NoSender address. It must match a verified identity from ``list_email_domains``; on a custom domain any local part works. When omitted, Hail uses the default sender if available. Several eligible custom domains require an explicit address.
subjectYesSubject line the recipients see in their inbox.
metadataNoExtra data stored on the email record.
reply_toNoAddress that receives replies instead of the sender. Omitted: replies go to the sender.
body_htmlNoThe message as HTML. Open and click tracking works only with an HTML body. Give this, ``body_text``, or both.
body_textNoThe message as plain text, shown by mail apps that cannot display HTML. Give this, ``body_html``, or both.
from_nameNoDisplay name for the From header, such as ``Acme Billing``. Control characters are rejected.
llm_modelNoThe calling agent's provider model ID, as shown in the client's model configuration when available. Recorded for analytics.
message_typeNoPurpose of the communication for consent checks. Transactional or service messages are ``informational``; promotional messages are ``marketing``.informational
attachment_idsNoAttachment IDs: the ``id`` from ``upload_email_attachment``, or from ``create_file_upload`` with purpose ``email_attachment``.
consent_sourceNoWhere or how consent was obtained, such as ``signup form``. Required when ``message_type`` is ``marketing``.
idempotency_keyNoRetry key. The ``idempotency_key`` from an earlier response refers to that original request instead of starting a new one. Omitted: a new key is generated and returned.
recipient_consentYesConfirmation from the user that the recipient lawfully agreed to be contacted. Hail requires ``true`` and does not independently verify consent.
consent_obtained_atNoWhen consent was obtained, as an ISO 8601 timestamp, if known.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / llm_model / description
      Previous value: -"Model ID of the calling agent. Optional. Recorded for analytics only."New value: +"The calling agent's provider model ID, as shown in the client's model configuration when available. Recorded for analytics."
    • changedInput schema / properties / metadata / description
      Previous value: -"Free-form JSON object stored on the email record."New value: +"Extra data stored on the email record."
    • changedInput schema / properties / recipient_consent / description
      Previous value: -"Attestation that the recipient lawfully agreed to be contacted, as the user confirmed it. Hail does not check it; only ``true`` is accepted."New value: +"Confirmation from the user that the recipient lawfully agreed to be contacted. Hail requires ``true`` and does not independently verify consent."
  2. Changed6 schema fields changed
    • changedInput schema / properties / from_ / description
      Previous value: -"Sender address. It must match a verified identity from ``list_email_domains``; on a custom domain any local part works. Omitted: the workspace default sender."New value: +"Sender address. It must match a verified identity from ``list_email_domains``; on a custom domain any local part works. When omitted, Hail uses the default sender if available. Several eligible custom domains require an explicit address."
    • changedInput schema / properties / message_type / description
      Previous value: -"``informational`` for transactional or service messages, or ``marketing``."New value: +"Purpose of the communication for consent checks. Transactional or service messages are ``informational``; promotional messages are ``marketing``."
    • addedOutput schema / $defs
      Added value: +{
      +  "EmailAttachmentResponse": {
      +    "description": "One inbound MIME attachment as exposed to API consumers.\n\n``url`` is the stable Hail API endpoint that 302-redirects to a\npresigned S3 URL on access — see GET /emails/{id}/attachments/{aid}.",
      +    "properties": {
      +      "content_id": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "MIME Content-ID, present when this attachment is referenced inline (cid:) from the HTML body. Null otherwise.",
      +        "title": "Content Id"
      +      },
      +      "content_type": {
      +        "description": "MIME type of the attachment.",
      +        "title": "Content Type",
      +        "type": "string"
      +      },
      +      "filename": {
      +        "description": "Original filename of the attachment.",
      +        "title": "Filename",
      +        "type": "string"
      +      },
      +      "id": {
      +        "description": "Unique identifier for this attachment.",
      +        "format": "uuid",
      +        "title": "Id",
      +        "type": "string"
      +      },
      +      "size_bytes": {
      +        "description": "Size of the attachment in bytes.",
      +        "title": "Size Bytes",
      +        "type": "integer"
      +      },
      +      "url": {
      +        "description": "API endpoint that 302-redirects to a presigned download URL for this attachment.",
      +        "title": "Url",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "filename",
      +      "content_type",
      +      "size_bytes",
      +      "content_id",
      +      "url"
      +    ],
      +    "title": "EmailAttachmentResponse",
      +    "type": "object"
      +  }
      +}
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "properties": {
      +      "agent_id": {
      +        "anyOf": [
      +          {
      +            "format": "uuid",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The agent this email belongs to: the address's agent on inbound rows, the writer on outbound rows.",
      +        "title": "Agent Id"
      +      },
      +      "agent_reply_state": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Inbound rows routed to an agent: 'pending', 'processing', 'done', 'skipped', or 'failed'. A skipped row names why in metadata.agent_skip_reason.",
      +        "title": "Agent Reply State"
      +      },
      +      "attachments": {
      +        "default": [],
      +        "description": "Inbound MIME attachments on this email. Empty on outbound rows.",
      +        "items": {
      +          "$ref": "#/$defs/EmailAttachmentResponse"
      +        },
      +        "title": "Attachments",
      +        "type": "array"
      +      },
      +      "bcc_addresses": {
      +        "anyOf": [
      +          {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "BCC recipient email addresses, if any.",
      +        "title": "Bcc Addresses"
      +      },
      +      "body_html": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "HTML body, if any.",
      +        "title": "Body Html"
      +      },
      +      "body_text": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Plain-text body, if any.",
      +        "title": "Body Text"
      +      },
      +      "cc_addresses": {
      +        "anyOf": [
      +          {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "CC recipient email addresses, if any.",
      +        "title": "Cc Addresses"
      +      },
      +      "direction": {
      +        "default": "outbound",
      +        "description": "'outbound' for emails Hail sent, 'inbound' for emails received.",
      +        "enum": [
      +          "outbound",
      +          "inbound"
      +        ],
      +        "title": "Direction",
      +        "type": "string"
      +      },
      +      "dkim_verdict": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Provider DKIM-authentication verdict (e.g. 'PASS'/'FAIL'). Inbound emails only; null on outbound rows.",
      +        "title": "Dkim Verdict"
      +      },
      +      "dmarc_verdict": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Provider DMARC-authentication verdict (e.g. 'PASS'/'FAIL'). Inbound emails only; null on outbound rows.",
      +        "title": "Dmarc Verdict"
      +      },
      +      "email_domain_id": {
      +        "anyOf": [
      +          {
      +            "format": "uuid",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "The sending domain used, if from_address belongs to one of the org's configured domains.",
      +        "title": "Email Domain Id"
      +      },
      +      "end_reason": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Reason delivery failed or bounced, if applicable. Null on success or while pending.",
      +        "title": "End Reason"
      +      },
      +      "failed_at": {
      +        "anyOf": [
      +          {
      +            "format": "date-time",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "When the send failed, ISO 8601 timestamp. Null unless it failed.",
      +        "title": "Failed At"
      +      },
      +      "from_address": {
      +        "description": "Sender email address.",
      +        "title": "From Address",
      +        "type": "string"
      +      },
      +      "from_name": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Display name used on the From: header, when the sender supplied one. Always null on inbound rows.",
      +        "title": "From Name"
      +      },
      +      "id": {
      +        "description": "Unique identifier for this email.",
      +        "format": "uuid",
      +        "title": "Id",
      +        "type": "string"
      +      },
      +      "idempotency_key": {
      +        "description": "Key that identifies this exact request when retrying.",
      +        "type": "string"
      +      },
      +      "in_reply_to": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "RFC 5322 In-Reply-To header. Set on inbound emails and agent replies; null on other outbound rows.",
      +        "title": "In Reply To"
      +      },
      +      "last_event_at": {
      +        "anyOf": [
      +          {
      +            "format": "date-time",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "When the most recent delivery event for this email occurred, ISO 8601 timestamp.",
      +        "title": "Last Event At"
      +      },
      +      "message_id": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "RFC 5322 Message-ID header. Inbound emails only; null on outbound rows.",
      +        "title": "Message Id"
      +      },
      +      "metadata": {
      +        "additionalProperties": true,
      +        "description": "Free-form JSON object attached to the email, as sent on create. Not interpreted by Hail.",
      +        "title": "Metadata",
      +        "type": "object"
      +      },
      +      "organization_id": {
      +        "description": "Organization that sent or received this email.",
      +        "format": "uuid",
      +        "title": "Organization Id",
      +        "type": "string"
      +      },
      +      "provider_message_id": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "The email provider's identifier for this message, if assigned.",
      +        "title": "Provider Message Id"
      +      },
      +      "provider_received_at": {
      +        "anyOf": [
      +          {
      +            "format": "date-time",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "When the provider received this email, ISO 8601 timestamp. Inbound emails only.",
      +        "title": "Provider Received At"
      +      },
      +      "raw_url": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "API endpoint that redirects to the original MIME blob. Inbound emails only; null on outbound rows.",
      +        "title": "Raw Url"
      +      },
      +      "references_ids": {
      +        "anyOf": [
      +          {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "RFC 5322 References header, split into ids. Set on inbound emails and agent replies; null on other outbound rows.",
      +        "title": "References Ids"
      +      },
      +      "reply_to": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Reply-To email address, if set.",
      +        "title": "Reply To"
      +      },
      +      "requested_at": {
      +        "description": "When the send was requested, ISO 8601 timestamp.",
      +        "format": "date-time",
      +        "title": "Requested At",
      +        "type": "string"
      +      },
      +      "sent_at": {
      +        "anyOf": [
      +          {
      +            "format": "date-time",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "When the message was handed to the provider, ISO 8601 timestamp. Null until sent.",
      +        "title": "Sent At"
      +      },
      +      "spam_verdict": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Provider spam-scan verdict (e.g. 'PASS'/'FAIL'). Inbound emails only; null on outbound rows.",
      +        "title": "Spam Verdict"
      +      },
      +      "spf_verdict": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Provider SPF-authentication verdict (e.g. 'PASS'/'FAIL'). Inbound emails only; null on outbound rows.",
      +        "title": "Spf Verdict"
      +      },
      +      "status": {
      +        "description": "Delivery status: 'queued', 'sent', 'delivered', 'failed', 'bounced', 'complained', or 'received' (inbound emails).",
      +        "enum": [
      +          "queued",
      +          "sent",
      +          "delivered",
      +          "failed",
      +          "bounced",
      +          "complained",
      +          "received"
      +        ],
      +        "title": "Status",
      +        "type": "string"
      +      },
      +      "subject": {
      +        "description": "Email subject line.",
      +        "title": "Subject",
      +        "type": "string"
      +      },
      +      "to_addresses": {
      +        "description": "Recipient email addresses.",
      +        "items": {
      +          "type": "string"
      +        },
      +        "title": "To Addresses",
      +        "type": "array"
      +      },
      +      "virus_verdict": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Provider virus-scan verdict (e.g. 'PASS'/'FAIL'). Inbound emails only; null on outbound rows.",
      +        "title": "Virus Verdict"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "organization_id",
      +      "email_domain_id",
      +      "direction",
      +      "from_address",
      +      "from_name",
      +      "to_addresses",
      +      "cc_addresses",
      +      "bcc_addresses",
      +      "reply_to",
      +      "subject",
      +      "status",
      +      "end_reason",
      +      "provider_message_id",
      +      "requested_at",
      +      "sent_at",
      +      "failed_at",
      +      "metadata",
      +      "body_text",
      +      "body_html",
      +      "message_id",
      +      "in_reply_to",
      +      "references_ids",
      +      "agent_id",
      +      "agent_reply_state",
      +      "spam_verdict",
      +      "virus_verdict",
      +      "dkim_verdict",
      +      "spf_verdict",
      +      "dmarc_verdict",
      +      "provider_received_at",
      +      "raw_url",
      +      "attachments",
      +      "last_event_at",
      +      "idempotency_key"
      +    ],
      +    "title": "EmailResponse",
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "error": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedOutput schema / title
      Removed value: -"send_email_toolDictOutput"
  3. Changed1 schema field changed
    • addedInput schema / properties / llm_model
      Added value: +{
      +  "description": "Model ID of the calling agent. Optional. Recorded for analytics only.",
      +  "type": "string"
      +}
  4. Changed1 schema field changed
    • changedInput schema / properties / from_name / description
      Previous value: -"Display name for the From header, such as ``Acme Billing``."New value: +"Display name for the From header, such as ``Acme Billing``. Control characters are rejected."
  5. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and openWorldHint=true, so the external side effect is known; the description adds substantive context beyond that: Hail does not verify consent (shifting legal responsibility to the caller), a workspace without a sender auto-provisions a Hail address, blocked domains are skipped for automatic picks, and plain-text emails still generate delivery/bounce events. It also states the return payload, though that is largely covered by the output schema.

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?

The critical constraint (verified workspace sender) is front-loaded, and every paragraph covers a distinct topic: sender selection, non-verification of consent, return value. It is somewhat long and the sender-selection paragraph duplicates the from_ schema description, with RST-style double-backtick artifacts adding minor visual noise.

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

Completeness4/5

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

Given 17 parameters at full schema coverage, an output schema, and complete annotations, the description supplies the parts structured fields cannot: consent liability, sender fallback logic, and blocked-domain behavior. Only marginal gaps remain, such as rate limits and attachment/size constraints, which are security-relevant but arguably out of scope.

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 description coverage is 100%, so the schema already documents sender matching, body alternatives, message_type, consent fields and idempotency. The description adds one genuinely new rule not in the schema: a domain blocked from sending (sends_enabled false) is skipped for automatic picks and refuses an explicit from_. Otherwise the from_ paragraph mostly restates the schema, so the baseline 3 is appropriate.

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

Purpose4/5

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

The opening line states a specific verb and resource: sending an email from a verified workspace sender. It is unambiguous what the tool does and implicitly distinct from send_sms and list_emails, though it never names a sibling to contrast against, which keeps it from a 5.

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

Usage Guidelines3/5

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

The description gives real preconditions and conditional behavior (consent must be true, explicit from_ required when several custom domains are verified, blocked domains refuse explicit from_), but all of this governs parameter choice rather than when to call this tool versus alternatives. There is no explicit when-to-use / when-not-to-use framing.

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.