Skip to main content
Glama
dazanza
by dazanza

list_templates

Retrieve available email templates from Mailchimp to use in campaigns. Filter results by template type and control the number displayed.

Instructions

List available Mailchimp email templates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of results (default 10)
typeNoFilter by type: user, base, gallery

Implementation Reference

  • server.js:43-64 (handler)
    Registration and implementation of the "list_templates" tool.
    // --- Tool 2: List Templates ---
    server.tool(
      "list_templates",
      "List available Mailchimp email templates.",
      {
        count: z.number().optional().describe("Number of results (default 10)"),
        type: z.string().optional().describe("Filter by type: user, base, gallery"),
      },
      async ({ count, type }) => {
        const opts = { count: count || 10 };
        if (type) opts.type = type;
        const response = await mailchimp.templates.list(opts);
        const templates = response.templates.map((t) => ({
          id: t.id,
          name: t.name,
          type: t.type,
          category: t.category,
          date_created: t.date_created,
        }));
        return { content: [{ type: "text", text: JSON.stringify(templates, null, 2) }] };
      }
    );

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

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