get_campaign_report
Retrieve detailed analytics and performance data for a specific Mailchimp email campaign to track opens, clicks, and engagement metrics.
Instructions
Get detailed report for a specific campaign
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| campaign_id | Yes | The campaign ID |
Implementation Reference
- src/tools/index.ts:883-892 (handler)The tool handler logic within the handleToolCall function that invokes the Mailchimp service's getCampaignReport method, processes the result, and returns a formatted text response.case "get_campaign_report": const campaignReport = await service.getCampaignReport(args.campaign_id); return { content: [ { type: "text", text: JSON.stringify(campaignReport, null, 2), }, ], };
- src/tools/index.ts:300-309 (schema)Input schema definition for the get_campaign_report tool, specifying an object with a required string campaign_id property.inputSchema: { type: "object", properties: { campaign_id: { type: "string", description: "The campaign ID", }, }, required: ["campaign_id"], },
- src/tools/index.ts:297-310 (registration)Registration of the get_campaign_report tool in the getToolDefinitions array, including name, description, and input schema.{ name: "get_campaign_report", description: "Get detailed report for a specific campaign", inputSchema: { type: "object", properties: { campaign_id: { type: "string", description: "The campaign ID", }, }, required: ["campaign_id"], }, },
- src/services/mailchimp.ts:249-253 (helper)Core helper method in MailchimpService that performs the API request to retrieve the campaign report from Mailchimp's /reports/{campaignId} endpoint.async getCampaignReport( campaignId: string ): Promise<MailchimpCampaignReport> { return await this.makeRequest(`/reports/${campaignId}`); }