Skip to main content
Glama

Send Personalized Email (preview, then confirm)

send_personalized_email
Destructive

Send a mail-merge email through the Email API: one call, many recipients, each with its own merge_vars object substituted into {{key}} placeholders in the subject, from name and body ({{{key}}} inserts raw HTML). Combined merge_vars must be at most 100 KB. Two steps: call first WITHOUT confirm to get a preview (recipient count, from, subject, merge keys) — nothing is sent. Show it to the user and get an explicit yes, then call again with confirm: true. dry_run: true previews without sending even when confirm is true.

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": {
      "from": "<from>",
      "subject": "<subject>",
      "to": "<to>"
    },
    "name": "send_personalized_email"
  }
}

Input Schema

NameRequiredDescriptionDefault
ccNoCC addresses (use the first recipient's merge_vars)
toYesRecipients, each with its own merge_vars; each gets an individual message
bccNoBCC addresses (use the first recipient's merge_vars)
fromYesVerified sender email address
htmlNoHTML body. {{var}} is HTML-escaped, {{{var}}} is inserted raw
textNoPlain text body
confirmNoMust be true to actually send. Leave false first to get a preview
dry_runNoValidate and show the send preview without sending, even when confirm is true
subjectYesSubject; {{var}} allowed
versionNo1.0 for HTML or 2.0 for AMP (default: 2.0 when amp_html is given, else 1.0)
amp_htmlNoAMP HTML body (needs version 2.0)
reply_toNoReply-to addresses (verified senders; no {{var}})
from_nameNoSender display name; {{var}} allowed
attachmentsNoAttachments (array of name and url)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / from / description
      Previous value: -"Verified sender email address,required"New value: +"Verified sender email address"
    • changedInput schema / properties / subject / description
      Previous value: -"Subject; {{var}} allowed,required"New value: +"Subject; {{var}} allowed"
    • changedInput schema / properties / to / description
      Previous value: -"Recipients, each with its own merge_vars; each gets an individual message,required"New value: +"Recipients, each with its own merge_vars; each gets an individual message"
    • changedInput schema / properties / to / items / properties / email / description
      Previous value: -"Recipient email address,required"New value: +"Recipient email address"
  2. Added

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the annotations (destructive, openWorld, non-idempotent), the description discloses the crucial behavioral fact that the first call sends nothing and only returns a preview with recipient count, from, subject, and merge keys. It also adds the 100 KB combined merge_vars ceiling and the empty-render behavior for missing keys — exactly the consequences an agent needs before invoking a destructive send.

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?

Three tightly packed sentences, front-loaded with what the tool does and immediately followed by the safety protocol. The {{key}} versus {{{key}}} explanation is partially redundant with the html and merge_vars schema descriptions, a minor repetition that keeps it from a 5.

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?

For a 14-parameter destructive send tool with no output schema, the definition covers the workflow, the size limit, placeholder semantics, and the confirm/dry_run interaction well. It does not mention send quotas, error/failure behavior, or the shape of a successful send response, which leaves some operational uncertainty.

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 baseline is 3, but the description adds real meaning on top: the 100 KB aggregate limit across merge_vars, the distinction between {{key}} escaping and {{{key}}} raw HTML insertion, and the interaction where dry_run overrides confirm. It does not elaborate on version/amp_html or attachment constraints, which the schema already covers.

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?

States a specific verb and resource ('Send a mail-merge email through the Email API') and scopes it as 'one call, many recipients' with per-recipient merge_vars, which implicitly separates it from single-recipient siblings like send_transactional_email. It never names an alternative tool explicitly, so sibling differentiation relies on inference rather than direct routing language.

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?

The two-step protocol is spelled out precisely: call without confirm to get a preview, show it to the user, obtain an explicit yes, then call with confirm: true. The dry_run escape hatch is also defined. It stops short of telling the agent when to prefer send_transactional_email or send_test_email instead, which is the main gap given the crowded sibling set.

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.

Resources