Skip to main content
Glama

get_campaign

Retrieve comprehensive campaign details including settings, tracking, and recipient information from Mailchimp to analyze performance and manage marketing activities.

Instructions

Get full details for a specific campaign including settings, tracking, and recipient info.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYes

Implementation Reference

  • The implementation of the get_campaign MCP tool. It fetches campaign details from the Mailchimp API and formats the relevant data.
    @mcp.tool()
    async def get_campaign(campaign_id: str) -> str:
        """Get full details for a specific campaign including settings, tracking, and recipient info."""
        mc = get_client()
        c = await mc.get(f"/campaigns/{campaign_id}")
        s = c.get("settings", {})
        r = c.get("recipients", {})
        t = c.get("tracking", {})
        return _fmt({
            "id": c["id"],
            "type": c.get("type", ""),
            "status": c.get("status", ""),
            "title": s.get("title", ""),
            "subject_line": s.get("subject_line", ""),
            "preview_text": s.get("preview_text", ""),
            "from_name": s.get("from_name", ""),
            "reply_to": s.get("reply_to", ""),
            "list_id": r.get("list_id", ""),
            "list_name": r.get("list_name", ""),
            "recipient_count": r.get("recipient_count", 0),
            "send_time": c.get("send_time"),
            "emails_sent": c.get("emails_sent", 0),
            "opens_tracking": t.get("opens", False),
            "clicks_tracking": t.get("html_clicks", False),
            "created_at": c.get("create_time", ""),
        })

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/AlexlaGuardia/mcp-mailchimp'

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