Send Email
send-emailSend transactional emails to one or more recipients using HTML, templates, attachments, and tracking. Use it for receipts, alerts, password resets, and personalized notifications.
Instructions
Purpose: Send a transactional email to one or more recipients. Supports HTML, plain text, AMP HTML, templates with merge tags, attachments, custom headers, tracking, and personalization.
Returns: Send confirmation with request ID and accepted/rejected counts.
When to use:
User wants to "send an email" to specific people
One-off messages: password reset, order confirmation, receipt, alert
User says "email this to X", "notify them", "send a message to..."
Sending with a template: use template_slug and substitution_data (subject is optional in this case)
Key trigger phrases: "Send an email", "Email this to", "Notify", "Send a message", "Reply to them"
Retrying: pass idempotency_key and reuse the same value on a retry. Without it, a retry after a timeout sends the email twice — the first attempt may well have succeeded and only the response was lost.
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>",
"from": "<from>"
},
"name": "send-email"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | Optional array of CC email addresses. You MUST ask the user for this parameter. Under no circumstance provide it yourself | |
| to | Yes | Array of recipient email addresses (1-50 recipients) | |
| bcc | No | Optional array of BCC email addresses. You MUST ask the user for this parameter. Under no circumstance provide it yourself | |
| tag | No | Tag for tracking and analytics (max 64 characters) | |
| from | Yes | Sender email address. You MUST ask the user for this parameter. Under no circumstance provide it yourself | |
| html | No | HTML email content. At least one of html, text or template_slug is required. | |
| text | No | Plain text email content. At least one of html, text or template_slug is required. | |
| headers | No | Custom email headers (up to 10). Standard envelope headers (From, To, Subject, etc.), SparkPost internal headers (X-MSYS-API) and List-Unsubscribe headers are managed automatically and cannot be overridden. | |
| options | No | Email delivery options | |
| subject | No | Email subject line. Required unless template_slug is provided — templates supply their own subject as a default. If provided alongside a template, overrides the template's subject. | |
| amp_html | No | AMP HTML content for supported email clients. | |
| metadata | No | Custom metadata for tracking (e.g. { "user_id": "123", "campaign": "onboarding" }) | |
| reply_to | No | Optional reply-to email address. You MUST ask the user for this parameter. Under no circumstance provide it yourself | |
| from_name | No | Sender display name (e.g. "Acme Support") | |
| project_id | No | Project ID containing the template. Defaults to the team's default project. | |
| attachments | No | Array of file attachments. Each needs name, type and either data (base64) or filePath. | |
| reply_to_name | No | Reply-To display name | |
| template_slug | No | Template slug to use for email content. When provided, the template's HTML is used. Use get-merge-tags to discover required substitution_data keys. | |
| idempotency_key | No | Opaque key making this send safe to retry. Reuse the SAME value when retrying and the API returns the original result instead of delivering a second email. Derive it from what the send is about (e.g. "order-12345-receipt"), not from a timestamp or random value — a fresh key on a retry defeats the point. Keys are kept 24 hours and are scoped per team and API key. | |
| template_version | No | Specific template version to use. Defaults to the active version. | |
| substitution_data | No | Variables for template substitution (e.g. { "first_name": "John" }). |