get_open_report
Retrieve subscriber open data for Mailchimp campaigns to analyze email engagement timing and recipient activity.
Instructions
Get open details for a campaign — which subscribers opened and when.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| campaign_id | Yes | ||
| count | No | ||
| offset | No |
Implementation Reference
- mcp_mailchimp/server.py:348-368 (handler)The 'get_open_report' handler function, decorated with @mcp.tool(), which fetches open details for a specific Mailchimp campaign.
async def get_open_report(campaign_id: str, count: int = 20, offset: int = 0) -> str: """Get open details for a campaign — which subscribers opened and when.""" mc = get_client() data = await mc.get( f"/reports/{campaign_id}/open-details", params={"count": min(count, 100), "offset": offset}, ) members = [] for m in data.get("members", []): members.append({ "email": m.get("email_address", ""), "opens_count": m.get("opens_count", 0), "first_open": m.get("first_open", ""), "last_open": m.get("last_open", ""), }) return _fmt({ "campaign_id": campaign_id, "total_opens": data.get("total_opens", 0), "total_items": data.get("total_items", 0), "members": members, })