Skip to main content
Glama

CallMCP — Phone Call MCP Server

Draft Email Campaign

draft_email_campaign

Save an email campaign for the business to review: a subject, a plain-text body, the customers to email (lead_ids, each with recorded email permission) and who it comes from: a verified sending domain (sender_id) or one of the business's own connected email accounts (email_account_id, listed under emailAccounts by get_email_campaign; sends at most 100 a day and 20 an hour, spaced out). Each customer gets their own email, addressed to them alone. Returns the campaign id and the fingerprint of this exact revision. Sends nothing; an owner or admin approves it with approve_email_campaign and it only goes out after launch_email_campaign. subject and text may use {{ first_name }}, {{ last_order_date }} and {{ last_order_items }} (filled per customer from the connected booking system; order_window picks which booking) or any key in lead_variables. Needs an admin of the business. Campaign email only goes from the business’s own verified sending domain or its own connected email account, to customers with recorded email permission who are not on the do-not-email list, within the daily amount allowed (the Kai level for a sending domain; 100 a day and 20 an hour for a connected account).

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": {
      "business_id": "<business_id>",
      "subject": "<subject>",
      "text": "<text>",
      "lead_ids": "<lead_ids>"
    },
    "name": "draft_email_campaign"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe plain-text email body.
designNoOptional structured email design. text must equal its rendered text version; no raw HTML. The owner approves the exact HTML and text.
subjectYesThe email subject.
lead_idsYesThe customers (lead ids) to email; each needs recorded email permission.
sender_idNoThe verified sending domain to send from. Pass this or email_account_id.
business_idYesThe business that sends the email.
daily_limitNoOptional: most emails sent per day (default: the most the sender and the Kai level allow).
order_windowNoOptional: which booking fills {{ last_order_date }} and {{ last_order_items }}. A holiday week ({"holiday": "thanksgiving", "year": 2025}; year defaults to last year) or dates ({"start": "2025-11-24", "end": "2025-11-30"}). Without it, each customer's most recent past booking is used.
lead_variablesNoOptional per-customer values for placeholders in subject/text, keyed by lead id: {"<lead_id>": {"last_order_date": "Nov 22, 2025"}}. {{ first_name }} is filled from the contact name unless given here; {{ key | default: "there" }} sets a fallback. Each customer gets their own email.
email_account_idNoOne of the business's own connected email accounts to send from (its id from get_email_campaign emailAccounts). Pass this or sender_id.

Output Schema

NameRequiredDescriptionDefault
idNo
codeNo
errorNoPresent when success is false
actionNo
statusNo
successYesWhether the tool completed successfully
senderIdNo
fingerprintNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / order_window
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Optional: which booking fills {{ last_order_date }} and {{ last_order_items }}. A holiday week ({\"holiday\": \"thanksgiving\", \"year\": 2025}; year defaults to last year) or dates ({\"start\": \"2025-11-24\", \"end\": \"2025-11-30\"}). Without it, each customer's most recent past booking is used.",
      +  "properties": {
      +    "end": {
      +      "description": "YYYY-MM-DD",
      +      "type": "string"
      +    },
      +    "holiday": {
      +      "enum": [
      +        "thanksgiving",
      +        "christmas",
      +        "july4",
      +        "memorial",
      +        "labor",
      +        "new-years"
      +      ],
      +      "type": "string"
      +    },
      +    "start": {
      +      "description": "YYYY-MM-DD",
      +      "type": "string"
      +    },
      +    "year": {
      +      "type": "integer"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed4 schema fields changed
    • addedInput schema / properties / email_account_id
      Added value: +{
      +  "description": "One of the business's own connected email accounts to send from (its id from get_email_campaign emailAccounts). Pass this or sender_id.",
      +  "type": "string"
      +}
    • addedInput schema / properties / lead_variables
      Added value: +{
      +  "additionalProperties": {
      +    "additionalProperties": {
      +      "type": [
      +        "string",
      +        "number"
      +      ]
      +    },
      +    "type": "object"
      +  },
      +  "description": "Optional per-customer values for placeholders in subject/text, keyed by lead id: {\"<lead_id>\": {\"last_order_date\": \"Nov 22, 2025\"}}. {{ first_name }} is filled from the contact name unless given here; {{ key | default: \"there\" }} sets a fallback. Each customer gets their own email.",
      +  "type": "object"
      +}
    • changedInput schema / properties / sender_id / description
      Previous value: -"The verified sender to send from."New value: +"The verified sending domain to send from. Pass this or email_account_id."
    • changedInput schema / required
      Previous value: -[
      -  "business_id",
      -  "sender_id",
      -  "subject",
      -  "text",
      -  "lead_ids"
      -]New value: +[
      +  "business_id",
      +  "subject",
      +  "text",
      +  "lead_ids"
      +]
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations, which only say readOnly=false, destructive=false, idempotent=false, openWorld=false. It discloses admin-level authorization, the return values (campaign id and revision fingerprint), per-recipient personalization, and concrete rate limits (100/day, 20/hour for connected accounts) plus the do-not-email and recorded-permission constraints.

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?

Front-loaded with the core action and drilled into constraints afterward, with no filler sentences. The closing sentence largely restates the sender/permission/limit rules already given earlier, which is the main redundancy but also serves as a compliance summary.

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 10-parameter, deeply nested, non-idempotent mutation tool, the description covers authorization, side effects, downstream workflow, personalization semantics, and delivery limits. With an output schema present, it needn't explain return shape beyond the id/fingerprint mention it already provides.

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 cross-parameter meaning the schema only partially conveys: how subject/text placeholders couple to order_window and lead_variables, the sender_id vs email_account_id choice, and how daily_limit interacts with the Kai level. It does not, however, document every parameter (e.g., design).

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+resource ("Save an email campaign for the business to review") and immediately enumerates what is being saved: subject, plain-text body, lead_ids, and sender. It is clearly distinguished from the approval/launch siblings, which are named as separate downstream steps.

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 states the tool sends nothing, that an owner or admin approves with approve_email_campaign, and that it only goes out after launch_email_campaign. It also routes the agent to get_email_campaign to discover emailAccounts, giving concrete alternatives and preconditions rather than implied usage.

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.