get_campaign
Retrieve detailed information about a specific Mailchimp email campaign using its unique ID to analyze performance, content, and settings.
Instructions
Get details of a specific campaign by ID.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"campaign_id": "<campaign_id>"
},
"name": "get_campaign"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| campaign_id | Yes | The campaign ID |
Implementation Reference
- server.js:92-103 (handler)The implementation of the 'get_campaign' tool, which takes a campaign_id and retrieves campaign details from the Mailchimp API.
// --- Tool 4: Get Campaign --- server.tool( "get_campaign", "Get details of a specific campaign by ID.", { campaign_id: z.string().describe("The campaign ID"), }, async ({ campaign_id }) => { const c = await mailchimp.campaigns.get(campaign_id); return { content: [{ type: "text", text: JSON.stringify(c, null, 2) }] }; } );