Skip to main content
Glama

Draft a campaign

draft_campaign

Save a DRAFT email or SMS campaign to a segment or a contact filter. This NEVER sends and never schedules: the site owner reviews the draft and sends it themselves from Inbox → Broadcasts. Choose channel explicitly; email uses subject and HTML, SMS uses body_text. Audience: segment_id, OR filter facets, OR target_all_contacts: true to deliberately reach everyone. A draft nobody could receive after consent checks is refused.

Input Schema

NameRequiredDescriptionDefault
nameYesInternal name, shown in the broadcasts list
tagsNoTags the contact must carry — ALL of them. Values exactly as list_contact_filter_vocabulary returns them, capitals and spaces included
fieldsNoCustom field filters: field_key → exact value, e.g. {"budget":"high"}. Keys from list_contact_filter_vocabulary; a select field's value must be one of its options
searchNoFree text matched against email, first name, last name and company
statusNoPipeline status the contact must have
channelNoDelivery channelemail
purposeNoOwner-declared message purposemarketing
site_idYesThe site, from list_sites
subjectNoEmail subject; omit for SMS
reply_toNoReply-to address; defaults to the site's notification address
body_htmlNoThe email body as HTML, written by you
body_textNoPlain-text alternative
from_nameNoSender display name; defaults to the site's sender
preheaderNoPreview text shown after the subject in most inboxes
user_goalNoOptional: the user's goal behind this call, in one short sentence of plain words (e.g. "add a page so customers can book tables"). No names, emails or other personal details.
segment_idNoTarget this segment; cannot be combined with facets
appointmentNoAppointment state: upcoming (booked, still to come), pending (upcoming, waiting for the owner to confirm), needs_time (asked for an appointment, waiting for the owner to pick a time), had (has had one before)
field_rulesNoTyped custom-field rules, all must match. op "in"/"not_in" take values (e.g. countries ["BR","IN"]); "gt"/"lt" take a numeric value (numeric fields only); "before"/"on_or_after" take value "YYYY-MM-DD"; "is_set"/"is_not_set" take nothing. Prefer this over `fields` for anything but one exact value
acquisition_sourceNoLead source, exactly as list_contact_filter_vocabulary returns it
target_all_contactsNotrue to deliberately target every contact; required when no segment_id and no facets are given
acquisition_campaignNoAcquisition campaign, exactly as list_contact_filter_vocabulary returns it

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / user_goal
      Added value: +{
      +  "description": "Optional: the user's goal behind this call, in one short sentence of plain words (e.g. \"add a page so customers can book tables\"). No names, emails or other personal details.",
      +  "type": "string"
      +}
  2. Changed6 schema fields changed
    • removedInput schema / properties / body_html / minLength
      Removed value: -1
    • addedInput schema / properties / channel
      Added value: +{
      +  "default": "email",
      +  "description": "Delivery channel",
      +  "enum": [
      +    "email",
      +    "sms"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / purpose
      Added value: +{
      +  "default": "marketing",
      +  "description": "Owner-declared message purpose",
      +  "enum": [
      +    "marketing",
      +    "service"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / subject / description
      Added value: +"Email subject; omit for SMS"
    • removedInput schema / properties / subject / minLength
      Removed value: -1
    • changedInput schema / required
      Previous value: -[
      -  "site_id",
      -  "name",
      -  "subject",
      -  "body_html"
      -]New value: +[
      +  "site_id",
      +  "name"
      +]
  3. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly=false, destructive=false, not idempotent), and the description adds real context on top: no sending, no scheduling, human review required, and a consent-based refusal rule. That refusal behavior is nowhere in the structured fields and is exactly what an agent needs to anticipate an error.

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 fact (draft only, never sends), then channel, audience, and refusal in sequence. Dense and mostly waste-free, though the channel sentence overlaps with the defaulted enum in the schema.

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 21-parameter tool with nested field_rules and no output schema, the description covers the decision-critical aspects (intent, channel, audience exclusivity, refusal). It leaves the filter vocabulary and appointment/purpose semantics to the 100%-covered schema, which is acceptable, but a line on what the returned draft identifier enables would close the loop.

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 baseline is 3; the description adds cross-parameter semantics the schema only partly encodes — channel determines whether subject/body_html vs body_text apply, and the three mutually exclusive audience modes. It doesn't touch the filter facets (tags, fields, field_rules), but those are documented per-parameter.

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?

Specific verb+resource ('Save a DRAFT email or SMS campaign') with scope qualifiers (to a segment or contact filter). The description immediately separates this from send/schedule tools like start_marketing_campaign by stating it never sends and never schedules.

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 workflow (owner reviews and sends from Inbox → Broadcasts), the channel requirement, and the audience selection rule: segment_id OR filter facets OR target_all_contacts: true. It also names the failure condition ('a draft nobody could receive after consent checks is refused'), which tells the agent what will not work.

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