Skip to main content
Glama
AgentX-ai

Mailchimp MCP Server

by AgentX-ai

list_templates

Retrieve all email templates from your Mailchimp account for use in marketing campaigns.

Instructions

List all templates in your Mailchimp account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler for the 'list_templates' tool in the handleToolCall switch statement. It calls the Mailchimp service's listTemplates method and formats the result as MCP-compatible content with a JSON string of template summaries.
    case "list_templates": const templates = await service.listTemplates(); return { content: [ { type: "text", text: JSON.stringify( templates.templates.map((t) => ({ id: t.id, name: t.name, type: t.type, drag_and_drop: t.drag_and_drop, responsive: t.responsive, active: t.active, date_created: t.date_created, })), null, 2 ), }, ], };
  • Tool registration entry in the tools array, defining the name, description, and input schema (no parameters required).
    { name: "list_templates", description: "List all templates in your Mailchimp account", inputSchema: { type: "object", properties: {}, required: [], }, },
  • Input schema for the 'list_templates' tool, specifying an empty object with no required properties.
    inputSchema: { type: "object", properties: {}, required: [], },
  • Helper method in MailchimpService that performs the actual API request to fetch the list of templates using a paginated endpoint.
    async listTemplates(): Promise<{ templates: MailchimpTemplate[] }> { return await this.makePaginatedRequest( "/templates", "date_created", "DESC" ); }

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