Skip to main content
Glama

Draft a campaign

draftCampaign

Write a campaign for a segment and leave it as a DRAFT for review. Nothing is sent - a human opens it in Email → Campaigns and decides. Preview the audience first so the brief matches who would actually receive it. Kooga writes it from the brief, featuring the products given in productIds (all of them, as one grid) or ones that fit the brief. Or lay it out yourself in blocks, with its subject: when the person describes the email section by section, with images, chosen products or prices of their own, the body is exactly those blocks. It is set up to test two subject lines on a sample and send the winner to the rest, unless abTest is false. readCampaign shows the body as saved. Each call is a new campaign: to change one already drafted, use updateCampaign with its broadcastId instead, and deleteCampaign for one not wanted.

Only for a workspace with subscribed email contacts.

A change inside Kooga: it runs at once, as the person.

Input Schema

NameRequiredDescriptionDefault
nameYesInternal name for the campaign
briefYesGoal and angle, grounded in real numbers. Never invent discounts, prices, stock or urgency. With `blocks`, only kept as what the campaign is for.
abTestNoTest two subject lines on a sample of the audience first, then send the winner to the rest
blocksNoThe body, top to bottom, exactly as it should read. No footer: the sender line and the unsubscribe link are added under every email. readCampaign shows a body as it is saved
subjectNoThe subject line; needed with `blocks`, written from the brief otherwise. Merge tags are filled per reader: {{first_name}} or {{first_name|fallback}}, with first_name, last_name, name, city, country
subjectBNoThe second subject line to test; left out, one with a different angle is written
preheaderNoThe line shown after the subject in the inbox, with `blocks`
productIdsNoProducts to feature, by the store's own id (storeId from readProducts), all shown as one grid. Left out, the draft picks products that fit the brief. Not with `blocks`: chosen products go in its products block
segmentKeyYesWhich audience: 'all', a segment's key, or a segment's id, exactly as readSegments gives them
abTestHoursNoHow long the test runs before the winner goes to the rest
workspaceIdNoThe workspace, as listWorkspaces gives it (its id or slug). Leave it out when this connection reaches one workspace.

Output Schema

NameRequiredDescriptionDefault
statusYes
subjectYes
subjectBYesThe subject tested against it; null when there is no test
broadcastIdYes
productsLeftOutYesChosen products that are not in the email: unknown here, out of stock, without a page or not on sale

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare a non-destructive, non-idempotent write, and the description adds genuinely useful context: nothing is sent, a human reviews it in Email → Campaigns, and every call creates a new campaign rather than mutating one. It stops short on failure behaviour and the closing line 'it runs at once, as the person' is opaque rather than clarifying.

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?

The core purpose and the draft-safety guarantee lead, and the alternatives come after. The middle section is dense and clause-heavy ('Or lay it out yourself in `blocks`, with its `subject`: when the person describes...'), costing some readability, but nearly every sentence carries information.

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 11-parameter tool with a deep block union, an output schema, and full schema coverage, the description covers lifecycle, preconditions, mode selection, A/B defaults, and sibling routing. Nothing an agent needs in order to call it correctly 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 coverage is 100%, so per-parameter text is already handled; the description's added value is cross-parameter semantics — productIds rendered as one grid vs. authoring blocks, subject being required with blocks but auto-written otherwise, brief demoted to context when blocks are given, and abTest=false skipping the test. Those interactions are not obvious from the schema alone.

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?

States a specific verb+resource with precise scope: write a campaign for a segment and leave it as a DRAFT, nothing sent. It explicitly separates itself from siblings (updateCampaign for changes, deleteCampaign for unwanted ones, readCampaign for viewing the body), so an agent can pick the right tool without reading any schema.

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?

Gives explicit routing instructions: preview the audience first, use updateCampaign with broadcastId to modify an existing draft, deleteCampaign to discard, and each call creates a new campaign. It also states a precondition ('Only for a workspace with subscribed email contacts'), covering when-not 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.

Resources