Skip to main content
Glama

send_email

Destructive

Send an email to a lead, a person (contact_id) or an organisation (account_id) — or to any address. Required: subject, body, and lead_id, contact_id, account_id or to_address (to_address defaults to the record's e-mail). Sender: from_email picks one of the tenant's connected mailboxes (own SMTP server, Microsoft or Google); as_me=true sends with your name and sets Reply-To to your address so answers reach you; or set reply_to. If the tenant has switched off external providers (mail_only_own_server), the mail is only sent through an own mailbox. The mail appears in the person's/lead's history. Optional: campaign_id, bcc. Creates a draft and sends it via the existing email pipeline. SENDS FOR REAL to the lead — use send_draft_email first if a human needs to approve. Optional: attachments — document_ids of files already stored (upload_document / create_document_upload_url, or a campaign document). They travel as an expiring download link appended to the mail, and an unknown or foreign document_id ABORTS the send rather than quietly dropping the attachment: a mail whose text points at an enclosure that never came is worse than no mail. Optional: attachment_mode — 'link' (default: an expiring download link is appended to the mail; no size limit, and you can see who downloaded) or 'file' (the file really travels as an attachment; capped at 20 MB in total, because above that receiving servers start refusing the mail). For a brochure the link is usually better, for an invoice or a signed document it is the wrong form. UNSUBSCRIBE (marketing/campaign mails): set unsubscribe_link=true or put {{abmelde_link}} (alias {{unsubscribe_url}}) into body and body_html — every recipient gets a personal signed unsubscribe link (no address in the URL) plus List-Unsubscribe and List-Unsubscribe-Post: One-Click headers. Clicking it records the withdrawal in this tenant (consent revoked, address on the blocklist, entry in the record history). Addresses on the blocklist (list_blacklist, channel email_unsubscribe — also Brevo imports via sync_brevo_unsubscribes) are REFUSED for every purpose except rechnung/vertrag, with a clear 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": {
      "subject": "<subject>",
      "body": "<body>"
    },
    "name": "send_email"
  }
}

Input Schema

NameRequiredDescriptionDefault
bccNoExtra blind-copy recipients for THIS send — array or comma-separated string. ADDS TO the campaign's bcc_emails, it does not replace them; set the campaign field for a copy that cannot be forgotten. Invalid addresses are dropped and logged, they never block the send.
bodyYesPlain-text body (also the text/plain part when body_html is given).
as_meNoYour name as sender name, Reply-To your login address.
lead_idNoID of the lead
purposeNoThe processing purpose of THIS mail (e.g. akquise, newsletter, bestandskunde, rechnung). A consent is always for ONE purpose: whoever agreed to the newsletter did not agree to cold outreach, so without a purpose the check can only look at the record's state and at withdrawals. Falls back to the campaign's processing_purpose. If the tenant has switched on legal_basis_enforced, a mail without any purpose is refused.
subjectYesSubject line
languageNoLanguage of the unsubscribe confirmation page: de, en, fr, it, nl, es (default de).
reply_toNoReply-to email address
body_htmlNoOptional designed HTML version of the mail, sent UNCHANGED as the text/html part (multipart/alternative); body stays required and is the plain-text part. Attachment links, unsubscribe and AI notice are inserted before </body> (or appended). Max 512 KB; link images, no data: URLs.
from_nameNoSender display name
account_idNoID of the account (company)
contact_idNoID of the contact
from_emailNoAddress of a connected mailbox of this tenant to send from (list_mailboxes). The mail goes out through exactly that mailbox; an address without a matching mailbox is refused.
to_addressNoRecipient email address
attachmentsNodocument_ids
campaign_idNoID of the campaign
campaign_tagNoShort campaign label recorded with an unsubscribe (e.g. haendler-mail-1).
attachment_modeNolink (default) or file
unsubscribe_linkNoAdd a personal unsubscribe link + List-Unsubscribe headers (on automatically when the text contains {{abmelde_link}} / {{unsubscribe_url}}). Without a placeholder a short German note with the link is appended.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / bcc / items
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / bcc / type
      Added value: +[
      +  "array",
      +  "string"
      +]
  2. Changed3 schema fields changed
    • addedInput schema / properties / campaign_tag
      Added value: +{
      +  "description": "Short campaign label recorded with an unsubscribe (e.g. haendler-mail-1).",
      +  "type": "string"
      +}
    • addedInput schema / properties / language
      Added value: +{
      +  "description": "Language of the unsubscribe confirmation page: de, en, fr, it, nl, es (default de).",
      +  "type": "string"
      +}
    • addedInput schema / properties / unsubscribe_link
      Added value: +{
      +  "description": "Add a personal unsubscribe link + List-Unsubscribe headers (on automatically when the text contains {{abmelde_link}} / {{unsubscribe_url}}). Without a placeholder a short German note with the link is appended.",
      +  "type": "boolean"
      +}
  3. Changed3 schema fields changed
    • changedInput schema / properties / body / description
      Previous value: -"Body text"New value: +"Plain-text body (also the text/plain part when body_html is given)."
    • addedInput schema / properties / body_html
      Added value: +{
      +  "description": "Optional designed HTML version of the mail, sent UNCHANGED as the text/html part (multipart/alternative); body stays required and is the plain-text part. Attachment links, unsubscribe and AI notice are inserted before </body> (or appended). Max 512 KB; link images, no data: URLs.",
      +  "type": "string"
      +}
    • changedInput schema / properties / from_email / description
      Previous value: -"Address of a connected mailbox to send from."New value: +"Address of a connected mailbox of this tenant to send from (list_mailboxes). The mail goes out through exactly that mailbox; an address without a matching mailbox is refused."
  4. Changed9 schema fields changed
    • addedInput schema / properties / account_id / description
      Added value: +"ID of the account (company)"
    • addedInput schema / properties / body / description
      Added value: +"Body text"
    • addedInput schema / properties / campaign_id / description
      Added value: +"ID of the campaign"
    • addedInput schema / properties / contact_id / description
      Added value: +"ID of the contact"
    • addedInput schema / properties / from_name / description
      Added value: +"Sender display name"
    • addedInput schema / properties / lead_id / description
      Added value: +"ID of the lead"
    • addedInput schema / properties / reply_to / description
      Added value: +"Reply-to email address"
    • addedInput schema / properties / subject / description
      Added value: +"Subject line"
    • addedInput schema / properties / to_address / description
      Added value: +"Recipient email address"
  5. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes far beyond the annotations (destructive, openWorld, non-idempotent) by disclosing the concrete side effects: the mail lands in the record's history, an unknown document_id ABORTS the send, blocklisted addresses are REFUSED, and unsubscribe clicks revoke consent and write to history. It also warns 'SENDS FOR REAL to the lead', which is the exact operational risk an agent needs stated.

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?

Purpose and requirements are front-loaded, but the prose is a dense wall of run-on sentences with heavy parentheticals ('a mail whose text points at an enclosure that never came is worse than no mail') and some redundancy with the schema's required fields. The content mostly earns its place, yet it would read better split into labeled sections (Sending, Attachments, Unsubscribe, Blocklist).

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 19-parameter, destructive, open-world send with no output schema, the description covers everything an agent needs: recipient resolution, sender selection, failure/abort behavior, attachment mode tradeoffs and size caps, unsubscribe mechanics, and blocklist refusal rules. Nothing material about invoking it safely is left unstated.

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?

With 100% schema coverage the baseline is 3, and the description adds real interpretation: from_email must map to a connected mailbox, as_me sets Reply-To to the caller's address, to_address defaults to the record's e-mail, and attachment_mode carries a 20 MB file cap rationale. Minor flaw: it lists lead_id/contact_id/account_id/to_address under 'Required' while the schema requires only subject and body, which could mislead on the conditional recipient rule.

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?

Opens with a specific verb and resource plus the target variants: 'Send an email to a lead, a person (contact_id) or an organisation (account_id) — or to any address.' It also differentiates from the sibling send_draft_email by naming the approval workflow, so an agent can tell which send path to take.

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?

Explicitly routes to alternatives and conditions: 'use send_draft_email first if a human needs to approve', and gives concrete when-to-use guidance for attachment_mode ('For a brochure the link is usually better, for an invoice or a signed document it is the wrong form'). It also states the blocklist exception (rechnung/vertrag) and the mail_only_own_server constraint, covering both when-to-use and when-not.

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.