Skip to main content
Glama
AgentX-ai

Mailchimp MCP Server

by AgentX-ai

get_campaign

Retrieve specific campaign details from Mailchimp to analyze email marketing performance and content.

Instructions

Get details of a specific campaign

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYesThe campaign ID

Implementation Reference

  • The handler function for the 'get_campaign' tool in handleToolCall. It invokes service.getCampaign with the provided campaign_id and returns the result as a JSON-formatted text response.
    case "get_campaign": const campaign = await service.getCampaign(args.campaign_id); return { content: [ { type: "text", text: JSON.stringify(campaign, null, 2), }, ], };
  • The tool definition in getToolDefinitions, including name, description, and input schema that requires a 'campaign_id' string.
    { name: "get_campaign", description: "Get details of a specific campaign", inputSchema: { type: "object", properties: { campaign_id: { type: "string", description: "The campaign ID", }, }, required: ["campaign_id"], }, },
  • The MailchimpService helper method getCampaign that makes an API request to retrieve campaign details from Mailchimp's /campaigns/{campaignId} endpoint.
    async getCampaign(campaignId: string): Promise<MailchimpCampaign> { return await this.makeRequest(`/campaigns/${campaignId}`); }

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

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