Skip to main content
Glama
dazanza
by dazanza

send_test_email

Send test emails for Mailchimp campaigns to verify content and formatting before launching to your full audience.

Instructions

Send a test email for a campaign before sending to the full audience.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYesCampaign ID
test_emailsYesArray of email addresses to send the test to
send_typeNoSend as HTML or plaintext (default: html)

Implementation Reference

  • The handler function for the send_test_email tool that calls the mailchimp SDK.
    async ({ campaign_id, test_emails, send_type }) => {
      await mailchimp.campaigns.sendTestEmail(campaign_id, {
        test_emails,
        send_type: send_type || "html",
      });
      return {
        content: [{ type: "text", text: JSON.stringify({ success: true, sent_to: test_emails }, null, 2) }],
      };
    }
  • server.js:247-264 (registration)
    Registration of the send_test_email tool using server.tool.
    server.tool(
      "send_test_email",
      "Send a test email for a campaign before sending to the full audience.",
      {
        campaign_id: z.string().describe("Campaign ID"),
        test_emails: z.array(z.string()).describe("Array of email addresses to send the test to"),
        send_type: z.enum(["html", "plaintext"]).optional().describe("Send as HTML or plaintext (default: html)"),
      },
      async ({ campaign_id, test_emails, send_type }) => {
        await mailchimp.campaigns.sendTestEmail(campaign_id, {
          test_emails,
          send_type: send_type || "html",
        });
        return {
          content: [{ type: "text", text: JSON.stringify({ success: true, sent_to: test_emails }, null, 2) }],
        };
      }
    );

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