Skip to main content
Glama
AgentX-ai

Mailchimp MCP Server

by AgentX-ai

get_merge_field

Retrieve details of a specific merge field from a Mailchimp list to access custom audience data for targeted email campaigns.

Instructions

Get details of a specific merge field

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
list_idYesThe list ID
merge_field_idYesThe merge field ID

Implementation Reference

  • Handler for the 'get_merge_field' tool call. It invokes the MailchimpService.getMergeField method with list_id and merge_field_id parameters and returns the result as a formatted text response.
    case "get_merge_field": const mergeField = await service.getMergeField( args.list_id, args.merge_field_id ); return { content: [ { type: "text", text: JSON.stringify(mergeField, null, 2), }, ], };
  • Tool schema definition including name, description, and input schema for 'get_merge_field' in the getToolDefinitions array.
    { name: "get_merge_field", description: "Get details of a specific merge field", inputSchema: { type: "object", properties: { list_id: { type: "string", description: "The list ID", }, merge_field_id: { type: "number", description: "The merge field ID", }, }, required: ["list_id", "merge_field_id"], }, },
  • Core helper method in MailchimpService that performs the API request to retrieve a specific merge field from a Mailchimp list.
    async getMergeField( listId: string, mergeFieldId: number ): Promise<MailchimpMergeField> { return await this.makeRequest( `/lists/${listId}/merge-fields/${mergeFieldId}` ); }

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