list_automation_emails
Retrieve all emails within a Mailchimp automation workflow to review content and track campaign sequences.
Instructions
List all emails in an automation
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflow_id | Yes | The workflow ID of the automation |
Implementation Reference
- src/services/mailchimp.ts:111-119 (handler)Core handler function that lists emails in a Mailchimp automation workflow by making a paginated API request to Mailchimp.async listAutomationEmails( workflowId: string ): Promise<{ emails: MailchimpAutomationEmail[] }> { return await this.makePaginatedRequest( `/automations/${workflowId}/emails`, "send_time", "DESC" ); }
- src/tools/index.ts:27-40 (registration)Tool registration and input schema definition for 'list_automation_emails' in the getToolDefinitions array.{ 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"], }, },
- src/tools/index.ts:580-599 (handler)MCP tool handler in handleToolCall switch that invokes the service method and formats the response as MCP content.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 ), }, ], };