Skip to main content
Glama

Write the campaign emails

argorant_set_campaign_emails
Destructive

Use it when the user says "write the emails", "change the second follow-up" or "A/B test two subject lines". It replaces a campaign's sequence, the first email and its follow-ups, each with optional A/B versions. Saving replaces every email and version, so always send the whole sequence; read the current one with argorant_get_campaign. For follow-ups that start on a reply keyword use argorant_set_campaign_subsequences. Write final text, never placeholders such as [link], [Name], TBD or XX. The answer's warnings list anything that would go out exactly as written; fix each one, because a launch is held while one remains. A running campaign refuses such text unless allow_placeholders=true, only for text the user wants sent as written. A contact with no value for a variable waits at that email instead of getting a blank, unless it has a fallback. Write {{signature}} where the signature goes. More in the docs at https://docs.argorant.com/docs/agents/tools#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": {
      "campaign_id": "<campaign_id>",
      "emails": "<emails>"
    },
    "name": "argorant_set_campaign_emails"
  }
}

Input Schema

NameRequiredDescriptionDefault
emailsYesThe whole sequence in order, first email first, up to 8, as [{subject?, body, delay_days?, same_thread?, variants?}]. The first email needs a subject; each later one is a follow-up sent delay_days after the one before. Contact variables are {{first_name}}, {{last_name}}, {{company}}, {{company_normalized}} (the short name people say, best in the body) and {{title}}; a fallback goes after a | sign, such as {{company_normalized|your team}}. Sender variables {{sender_first_name}}, {{sender_last_name}}, {{sender_full_name}}, {{sender_title}}, {{sender_company}}, {{sender_email}} and {{signature}} come from the sending mailbox; a mailbox without a display name holds the contact unless the variable has a fallback such as {{sender_first_name|Sam}}. The campaign's own {{custom_...}} variables, written in lowercase as defined with argorant_set_campaign_personalization, give each contact their personal line. Single braces such as {Hi|Hello} are spintax, one picked at random per email. variants holds up to 9 other versions of an email for an A/B test, each with a body and an optional subject and label; each contact gets one version, picked at random with equal odds, and argorant_campaign_analytics shows the results per version. Set a mailbox's display name with argorant_update_inbox.
campaign_idYesThe campaign's id, from argorant_list_campaigns.
allow_placeholdersNotrue only when the user clearly wants text such as [link] or TBD sent exactly as written. Off by default.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, and the description builds on that by spelling out that saving replaces every email and version, so the whole sequence must always be sent. It also discloses non-obvious runtime behavior: the warnings list flags anything that would ship as written and holds a launch, a running campaign refuses placeholder text unless overridden, and contacts with a missing variable stall at that email rather than receiving a blank unless a fallback exists.

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?

Usage triggers are front-loaded and nearly every sentence carries actionable content, but the block is a single dense paragraph that jumps between replacement semantics, variable syntax, A/B variants and placeholder policy. The variants and variable explanations overlap with the schema text, so some sentences do not fully earn their place.

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?

This is a destructive, high-stakes write with a rich nested schema and an output schema; the description covers replacement scope, required variable syntax, fallback and missing-variable behavior, the warnings contract and where to read documentation. Return values need not be explained because an output schema exists. An agent has everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the input schema already documents sequencing, variables, variants, same_thread and delay_days in depth, so the baseline of 3 applies. The description adds a little emphasis beyond the schema — that the whole sequence is mandatory and the meaning of allow_placeholders — but much of the variable and variants material is repeated rather than extended.

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 first sentence names the concrete user phrasings ("write the emails", "A/B test two subject lines") and the second states exactly what is written and replaced: the campaign's sequence, first email plus follow-ups, each with optional A/B versions. It explicitly separates itself from argorant_get_campaign (reading) and argorant_set_campaign_subsequences (reply-keyword follow-ups), so an agent can route without opening another 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?

Trigger phrases plus explicit alternatives: read the current sequence first with argorant_get_campaign, use argorant_set_campaign_subsequences for reply-keyword follow-ups, and allow_placeholders=true only when the user genuinely wants text sent verbatim. The when-not conditions (running campaign refusal, warning blocks launch) are stated rather than implied.

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.