Skip to main content
Glama

Email Campaign

email_campaign
Destructive

Email a business's customers. Email always goes out as a campaign the business owner reviews and approves, from the business's own verified sending domain, only to customers with recorded email consent who are not on the do-not-email list, and only as many a day as the business's Kai level allows (see /dashboard/level). Steps, by action: request_sender (domain, from, reply_to) creates the sending domain (a subdomain the business controls) and returns the DNS records to add; check_sender (sender_id) re-checks those records now, and the sender turns ready on its own once they verify; record_consent (lead_id and email, or emails, plus evidence_ref saying where the permission came from, e.g. 'web form opt-in') records email permission for existing customers, and revoke_consent takes it back; draft (sender_id, subject, text, lead_ids, optional design and daily_limit) saves a campaign for review and returns its campaign id and fingerprint; approve (campaign_id, fingerprint) is the owner approving that exact revision; launch (campaign_id) queues an approved campaign; cancel (campaign_id, fingerprint) stops it. check_sender needs any member; request_sender, record_consent, revoke_consent and draft need an admin of the business; approve, launch and cancel need the business owner. Nothing is sent by request_sender, draft or approve. Use get_email_campaign to see senders, campaigns and the customers who can be emailed. Never claim an email was delivered from this result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromNorequest_sender: the From address on that domain.
textNodraft: the plain-text email body.
emailNorecord_consent, revoke_consent: that customer's email address.
actionYes
designNodraft: optional structured email design. text must equal its rendered text alternative; no raw HTML. The owner approves exact submitted HTML and text.
domainNorequest_sender: the sending domain, e.g. mail.example.com.
emailsNorecord_consent, revoke_consent: email addresses of existing customers (up to 200).
lead_idNorecord_consent, revoke_consent: one customer (with email).
subjectNodraft: the email subject.
lead_idsNodraft: the customers (lead ids) to email; each needs recorded email consent.
reply_toNorequest_sender: where customer replies go.
sender_idNodraft: the verified sender to send from. check_sender: the sender to re-check.
expires_atNorecord_consent, optional: when the permission ends (ISO date).
business_idYesThe business sending the campaign.
campaign_idNoapprove, launch, cancel: the campaign.
daily_limitNodraft: most emails sent per day (default: the most the sender and the Kai level allow).
fingerprintNoapprove, cancel: the fingerprint of the exact revision, from draft or get_email_campaign.
evidence_refNorecord_consent, revoke_consent: where the permission came from, e.g. 'web form opt-in' or 'imported list: spring customers'.

Output Schema

TableJSON 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 / design
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "draft: optional structured email design. text must equal its rendered text alternative; no raw HTML. The owner approves exact submitted HTML and text.",
      +  "properties": {
      +    "accentColor": {
      +      "type": "string"
      +    },
      +    "body": {
      +      "type": "string"
      +    },
      +    "businessName": {
      +      "type": "string"
      +    },
      +    "buttonLabel": {
      +      "type": "string"
      +    },
      +    "buttonUrl": {
      +      "type": "string"
      +    },
      +    "headline": {
      +      "type": "string"
      +    },
      +    "preheader": {
      +      "type": "string"
      +    },
      +    "version": {
      +      "enum": [
      +        1
      +      ],
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "version",
      +    "businessName",
      +    "preheader",
      +    "headline",
      +    "body",
      +    "buttonLabel",
      +    "buttonUrl",
      +    "accentColor"
      +  ],
      +  "type": "object"
      +}
  2. Changed8 schema fields changed
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "request_sender",
      -  "draft",
      -  "approve",
      -  "launch",
      -  "cancel"
      -]New value: +[
      +  "request_sender",
      +  "check_sender",
      +  "record_consent",
      +  "revoke_consent",
      +  "draft",
      +  "approve",
      +  "launch",
      +  "cancel"
      +]
    • changedInput schema / properties / daily_limit / description
      Previous value: -"draft: most emails sent per day (default 50)."New value: +"draft: most emails sent per day (default: the most the sender and the Kai level allow)."
    • addedInput schema / properties / email
      Added value: +{
      +  "description": "record_consent, revoke_consent: that customer's email address.",
      +  "type": "string"
      +}
    • addedInput schema / properties / emails
      Added value: +{
      +  "description": "record_consent, revoke_consent: email addresses of existing customers (up to 200).",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / evidence_ref
      Added value: +{
      +  "description": "record_consent, revoke_consent: where the permission came from, e.g. 'web form opt-in' or 'imported list: spring customers'.",
      +  "type": "string"
      +}
    • addedInput schema / properties / expires_at
      Added value: +{
      +  "description": "record_consent, optional: when the permission ends (ISO date).",
      +  "type": "string"
      +}
    • addedInput schema / properties / lead_id
      Added value: +{
      +  "description": "record_consent, revoke_consent: one customer (with email).",
      +  "type": "string"
      +}
    • changedInput schema / properties / sender_id / description
      Previous value: -"draft: the verified sender to send from."New value: +"draft: the verified sender to send from. check_sender: the sender to re-check."
  3. Added

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: it discloses the consent gate, do-not-email exclusion, verified sending domain requirement, owner approval with fingerprint binding to an exact revision, daily send caps tied to Kai level, and which three actions send nothing. It also explains that a sender turns ready asynchronously, and forbids claiming delivery from the result — all behavior an agent cannot infer from destructiveHint/openWorldHint alone.

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 purpose before the action list, and every clause carries real constraint information, so length is largely earned by the 8-action surface. However, it is delivered as one dense run-on paragraph with semicolon chaining, which makes the per-action rules harder to scan than a structured list would be.

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 an 8-action, 18-parameter, nested-object tool with an output schema present, the description covers sequencing, permissions, sending constraints, and the boundaries of what does and does not dispatch mail. Return values need not be explained because an output schema exists, and nothing an agent needs before calling is missing.

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 description coverage is already 94%, so the baseline is 3, and the description still adds value by grouping the 18 parameters under their owning action (e.g. 'draft (sender_id, subject, text, lead_ids, optional design and daily_limit)') and clarifying the purpose of fingerprint, sender_id, and evidence_ref. It stops short of adding format or syntax detail beyond the schema, so it does not reach a 5.

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 ('Email a business's customers') and then enumerates each of the eight actions with its own parameters and effect, so an agent can tell exactly what this tool does. It explicitly names the sibling read tool get_email_campaign as the separate source of visibility, distinguishing it from that and from the other campaign/send siblings.

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?

Provides an implicit workflow (request_sender -> check_sender -> record_consent -> draft -> approve -> launch/cancel) and states which action to pick for each need. It also states per-action permission requirements (any member / admin / owner) and routes visibility queries to get_email_campaign, leaving little to inference.

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.