Skip to main content
Glama

campaigns_create

A campaign binds one sequence to one segment, plus the SMTP email_configs it can send through. After creation:

  1. The campaign is paused (is_active=false) by default.

  2. Use messages_preview with the sequence + segment to see what the first emails will look like for real leads — this lets the user catch template bugs before sending.

  3. campaigns_activate to start sending. Messages are generated in the background (returns a job_sqid).

Immutable fields after creation: sequence, segment. To retarget, delete and recreate. email_configs, priority, is_autopilot_enabled, add_limit, and unsubscribe settings can all be updated later.

Without at least one enabled SMTP email_config attached, activation will fail.

Method: POST /api/v1/workspaces/{workspace_sqid}/campaigns/

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": {
      "name": "<name>",
      "segment": "<segment>",
      "sequence": "<sequence>"
    },
    "name": "campaigns_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesCampaign display name (e.g. 'Q2 2026 — SaaS CTOs cold').
pinnedNoShow in the sidebar navigation for quick access. Cosmetic only.
segmentYes
priorityNoInteger; higher priority campaigns consume mailbox send slots first when quotas are tight. Default 0.
sequenceYes
add_limitNoUTC-daily cap on how many NEW leads **autopilot** may enrol into step 1 from this campaign's segment. Counter resets at UTC midnight (see `current_add_count` / `last_add_reset_at`). **Applies to autopilot only.** With `is_autopilot_enabled=false` nothing is enrolled automatically at all — enrol with `campaigns_add_leads`, which ignores this cap. `0` stops autopilot enrolling while leaving it free to keep the segment stocked, which is how you stage leads ahead of turning sending on. In-progress leads flow through the remaining steps either way. Typical setting: 50–200 for ramp-up on a fresh domain.
is_activeNoTrue = sending. Writable shorthand for `state`: setting it true moves the campaign to ACTIVE, setting it false to PAUSED (a campaign that is already cancelled or archived keeps that state). Prefer `campaigns_activate` / `campaigns_pause` — they also do the queue work.
mailboxesNoSqids of Mailbox rows used for sending (SMTP) and reply ingestion (IMAP) on this campaign. At least one enabled SMTP mailbox must be attached for `campaigns_activate` to succeed — list available mailboxes via `workspaces_mailboxes_list`. Settable on create AND update; on update this **replaces** the set (pass the full desired list, not a delta). Omit on PATCH to leave the existing set unchanged.
email_configsNoLegacy field — use mailboxes instead. Sqids of EmailConfig rows used for sending/receiving.
footer_templateNoThe footer added under every email of this campaign, as plain text (one line per row) — translate or reword it freely. Variables: `{legal_name}`, `{postal_address}`, `{registration_id}` (sender details from the workspace), `{unsubscribe_link}` (per-recipient opt-out link), `{privacy_link}` (the privacy notice through the sending domain; only for EEA/UK recipients and when the workspace has a notice), `{commercial_notice}` ("This is a commercial message from …" where US law asks for it and there is no consent; empty otherwise). A line whose variables are all empty is left out, and so is a ` · `-separated part whose variable is empty. In the HTML part the links become anchors; `{unsubscribe_link:Abmelden}` sets the anchor text. Blank = the default template. No other `{names}` are allowed. Leaving out `{unsubscribe_link}`, `{legal_name}` or `{postal_address}` is allowed but reported in `footer_warnings` and the pre-flight report (anti-spam laws require them).
is_footer_disabledNotrue = send this campaign's emails with no footer and no List-Unsubscribe / List-Unsubscribe-Post headers. Never blocks sending, but anti-spam laws require an opt-out and the sender's name and address in most countries, so every such send is recorded as a compliance warning (`compliance_decisions_list`, gate `footer`, reason `footer_disabled`) and the pre-flight report warns. Default false.
is_autopilot_enabledNoRuns the whole chain every 10 minutes: pulls fresh prospects from the saved searches feeding this campaign's segment when supply runs low, restarts stalled upstream enrichments, and generates messages that skip REVIEW_REQUIRED and are auto-approved for sending. Two costs to weigh: pulling spends connects, and there is no way to recall an auto-sent message — so turn this on only when template quality is proven. Use `campaigns_pipeline` to see what it would do and why it is or isn't filling.
mark_completed_afterNoDays after the last step's send before a lead who never replied is marked COMPLETED (and added to `completed_segment` when set). Default 7. The wait lets a late reply to the last step count as a reply; 0 completes leads as soon as the last step goes out.
blocked_email_fallbackNoWhat happens when the compliance rules don't allow an email step for a lead for an email-only reason (consent needed in their country, e.g. DE; a personal mailbox; missing source evidence) — instead of taking the lead out of the campaign, a task appears in `action_items_list` (`kind=rerouted`) to reach them on another channel, in place of that email step and each later one. `auto` (default): a LinkedIn task when the lead's LinkedIn profile is known (lead context or Discovery person), else a call task when a work phone is known, else no task. `linkedin_task` / `call_task`: always that task. `none`: no task; the lead leaves the campaign (the old behaviour). Opted-out, bounced and otherwise hard-blocked leads never get a task. Only applies when the gates are in enforce mode. * `auto` - LinkedIn task if we know their profile, else a call task if we know a phone * `linkedin_task` - Always a LinkedIn task * `call_task` - Always a call task * `none` - No task: take the lead out of the campaign
is_open_tracking_enabledNoInject a 1×1 tracking pixel. Off by default because Gmail now warns recipients about tracking images and reply rates drop. Only enable if you're certain the analytics are worth it. Skipped for recipients in countries whose rules require consent for tracking pixels (`tracking_pixel: consent_required`, e.g. FR) unless an active consent record exists; those messages then don't need a link domain either.
unsubscribe_clause_templateNo**Deprecated, write-only** — use `footer_template`. The old opt-out sentence (HTML allowed, only `{unsubscribe_link}`): it becomes the opt-out line of the default footer template. Ignored when `footer_template` is sent too.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the safety burden and does well: it discloses the default paused state, the immutable field set, the activation precondition, and that sending happens asynchronously via a job. Gaps remain — no statement of what the create call itself returns or what permissions/scopes are needed — and the 'returns a job_sqid' line sits under step 3, which could be misread as the create response.

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 one-sentence definition followed by a numbered lifecycle and a bolded immutability note — an agent can scan it in seconds. It is dense but nearly every clause carries operational value; the only friction is the `email_configs` reference in the opener, which conflicts with the schema's legacy warning and adds noise.

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 16-parameter create tool with no annotations and no output schema, the description covers the highest-risk aspects: default state, activation blocker, immutability, and the preview-before-send loop. It does not explain the return payload, and it leaves the many compliance/footer/tracking parameters entirely to the schema, which is acceptable given 88% schema coverage but leaves a small gap on what the caller gets back.

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 already 88%, so the baseline is 3; the description earns above that by classifying parameters into immutable (`sequence`, `segment`) and later-updatable (`email_configs`, `priority`, `is_autopilot_enabled`, `add_limit`, unsubscribe settings), a mutability contract the schema does not state per field. One flaw: it describes the campaign as binding `email_configs`, while the schema marks that field legacy and directs callers to `mailboxes`, which could steer an agent to the wrong 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?

The opening sentence defines exactly what is being created (a binding of one sequence to one segment plus the SMTP configs it sends through), and the trailing `POST /api/v1/workspaces/{workspace_sqid}/campaigns/` pins the resource unambiguously. It goes beyond restating the name by explaining the domain object's composition, so an agent knows what a successful call produces.

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?

It lays out the full workflow around the call: campaign starts paused, use `messages_preview` to validate templates before sending, then `campaigns_activate`. It also names the exact condition under which activation will fail (no enabled SMTP config) and tells the agent which fields require delete-and-recreate versus `campaigns_update`.

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.