Skip to main content
Glama
dazanza
by dazanza

create_campaign

Create and configure new email campaigns in Mailchimp by specifying audience, subject line, sender details, and campaign type for marketing automation.

Instructions

Create a new Mailchimp email campaign. Returns the campaign ID for use with set_campaign_content and send_campaign.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
list_idYesAudience/list ID (get from list_audiences)
subject_lineYesEmail subject line
from_nameYesSender name shown to recipients
reply_toYesReply-to email address
typeNoCampaign type (default: regular)
preview_textNoPreview text shown in inbox
titleNoInternal campaign title (for your reference)
segment_idNoSegment ID to send to a subset of the audience

Implementation Reference

  • The implementation of the 'create_campaign' tool, which uses the Mailchimp API to create a campaign and returns its ID.
    server.tool(
      "create_campaign",
      "Create a new Mailchimp email campaign. Returns the campaign ID for use with set_campaign_content and send_campaign.",
      {
        list_id: z.string().describe("Audience/list ID (get from list_audiences)"),
        subject_line: z.string().describe("Email subject line"),
        from_name: z.string().describe("Sender name shown to recipients"),
        reply_to: z.string().describe("Reply-to email address"),
        type: z.enum(["regular", "plaintext", "absplit", "rss"]).optional().describe("Campaign type (default: regular)"),
        preview_text: z.string().optional().describe("Preview text shown in inbox"),
        title: z.string().optional().describe("Internal campaign title (for your reference)"),
        segment_id: z.number().optional().describe("Segment ID to send to a subset of the audience"),
      },
      async ({ list_id, subject_line, from_name, reply_to, type, preview_text, title, segment_id }) => {
        const body = {
          type: type || "regular",
          recipients: { list_id },
          settings: {
            subject_line,
            from_name,
            reply_to,
            preview_text: preview_text || "",
            title: title || subject_line,
          },
        };
        if (segment_id) {
          body.recipients.segment_opts = { saved_segment_id: segment_id };
        }
        const response = await mailchimp.campaigns.create(body);
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(
                {
                  id: response.id,
                  status: response.status,
                  web_id: response.web_id,
                  subject_line: response.settings?.subject_line,
                  title: response.settings?.title,
                  list_id: response.recipients?.list_id,
                  archive_url: response.archive_url,
                },
                null,
                2
              ),
            },
          ],
        };
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions that the tool 'Returns the campaign ID for use with set_campaign_content and send_campaign,' which adds some behavioral context about the output and workflow. However, it lacks details on permissions, rate limits, or other behavioral traits like whether creation is reversible or has side effects, which is a significant gap for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core action and followed by a concise note on the return value and usage. Every sentence earns its place by providing essential information without waste, making it highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a campaign creation tool with 8 parameters, no annotations, and no output schema, the description is minimally adequate. It covers the purpose and hints at the output but lacks details on behavioral aspects like permissions or error handling, leaving gaps that could hinder an AI agent's understanding.

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 description coverage is 100%, meaning all parameters are documented in the schema. The description doesn't add any parameter-specific details beyond what the schema provides, such as explaining the significance of 'type' or 'segment_id.' Thus, it meets the baseline of 3 but doesn't compensate with extra semantic value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create a new Mailchimp email campaign') and resource ('Mailchimp email campaign'), making the purpose explicit. However, it doesn't differentiate from sibling tools like 'schedule_campaign' or 'send_campaign' beyond mentioning that the returned ID is used with them, which is helpful but not a full distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by stating that the returned campaign ID is for use with 'set_campaign_content' and 'send_campaign', suggesting a workflow. However, it doesn't explicitly say when to use this tool versus alternatives like 'schedule_campaign' or provide exclusions, leaving some ambiguity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dazanza/mailchimp-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server