Skip to main content
Glama
dazanza
by dazanza

get_campaign_content

Retrieve HTML and plain-text content from a Mailchimp campaign to review, edit, or analyze email marketing materials.

Instructions

Get the current HTML and plain-text content of a campaign.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYesCampaign ID

Implementation Reference

  • The handler function for 'get_campaign_content' which calls the Mailchimp API and returns the campaign content.
    async ({ campaign_id }) => {
      const response = await mailchimp.campaigns.getContent(campaign_id);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              {
                html: response.html?.substring(0, 5000) + (response.html?.length > 5000 ? "...[truncated]" : ""),
                plain_text: response.plain_text?.substring(0, 2000),
                archive_html: response.archive_html,
              },
              null,
              2
            ),
          },
        ],
      };
  • server.js:219-224 (registration)
    Registration of the 'get_campaign_content' tool.
    server.tool(
      "get_campaign_content",
      "Get the current HTML and plain-text content of a campaign.",
      {
        campaign_id: z.string().describe("Campaign ID"),
      },

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