get_campaign_content
Retrieve HTML and plain-text content from a Mailchimp campaign to review, edit, or repurpose email marketing materials.
Instructions
Get the HTML and plain-text content of a campaign.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| campaign_id | Yes |
Implementation Reference
- mcp_mailchimp/server.py:254-264 (handler)The implementation of the get_campaign_content MCP tool, which retrieves and formats campaign content from the Mailchimp API.
@mcp.tool() async def get_campaign_content(campaign_id: str) -> str: """Get the HTML and plain-text content of a campaign.""" mc = get_client() data = await mc.get(f"/campaigns/{campaign_id}/content") return _fmt({ "campaign_id": campaign_id, "plain_text": data.get("plain_text", "")[:2000], "html_preview": data.get("html", "")[:3000], "archive_html": data.get("archive_html", "")[:500], })