Skip to main content
Glama
AgentX-ai

Mailchimp MCP Server

by AgentX-ai

list_automation_emails

Retrieve all emails from a Mailchimp automation workflow to monitor content and track campaign sequences.

Instructions

List all emails in an automation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflow_idYesThe workflow ID of the automation

Implementation Reference

  • Tool handler that calls the service method and formats the response.
    case "list_automation_emails":
      const emails = await service.listAutomationEmails(args.workflow_id);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              emails.emails.map((e) => ({
                id: e.id,
                position: e.position,
                status: e.status,
                subject_line: e.settings.subject_line,
                emails_sent: e.emails_sent,
              })),
              null,
              2
            ),
          },
        ],
      };
  • Tool registration including name, description, and input schema.
    {
      name: "list_automation_emails",
      description: "List all emails in an automation",
      inputSchema: {
        type: "object",
        properties: {
          workflow_id: {
            type: "string",
            description: "The workflow ID of the automation",
          },
        },
        required: ["workflow_id"],
      },
    },
  • Core service method implementing the API call to list automation emails.
    async listAutomationEmails(
      workflowId: string
    ): Promise<{ emails: MailchimpAutomationEmail[] }> {
      return await this.makePaginatedRequest(
        `/automations/${workflowId}/emails`,
        "send_time",
        "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