list_automations
Retrieve all automated email workflows from your Mailchimp account to manage and review marketing sequences.
Instructions
List all automations in your Mailchimp account
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/index.ts:548-567 (handler)The handler function for the 'list_automations' tool. It calls the MailchimpService.listAutomations() method and formats the response as a JSON string of selected automation fields.case "list_automations": const automations = await service.listAutomations(); return { content: [ { type: "text", text: JSON.stringify( automations.automations.map((a) => ({ id: a.id, name: a.name, status: a.status, type: a.type, create_time: a.create_time, })), null, 2 ), }, ], };
- src/tools/index.ts:4-12 (schema)Tool schema definition including name, description, and empty input schema (no parameters required).{ name: "list_automations", description: "List all automations in your Mailchimp account", inputSchema: { type: "object", properties: {}, required: [], }, },
- src/services/mailchimp.ts:98-104 (helper)Core service method that makes a paginated API request to Mailchimp's /automations endpoint to fetch the list of automations.async listAutomations(): Promise<{ automations: MailchimpAutomation[] }> { return await this.makePaginatedRequest( "/automations", "create_time", "DESC" ); }
- src/index.ts:42-46 (registration)MCP server registration for listing tools, which includes 'list_automations' via getToolDefinitions.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: getToolDefinitions(mailchimpService), }; });
- src/types/index.ts:3-127 (schema)TypeScript interface defining the structure of MailchimpAutomation objects returned by the tool.export interface MailchimpAutomation { id: string; name: string; status: "save" | "paused" | "sending"; create_time: string; start_time?: string; from_name: string; from_email: string; subject: string; reply_to: string; to_name: string; title: string; type: | "abandonedCart" | "abandonedBrowse" | "api" | "bestCustomers" | "click" | "date" | "email" | "emailSeries" | "groupAdd" | "groupRemove" | "mandrill" | "product" | "purchase" | "signup" | "signupFollowUp" | "survey" | "visit" | "welcome"; template_id?: number; delay?: number; delay_type?: "now" | "day" | "hour" | "week"; delay_unit?: "day" | "hour" | "week"; delay_value?: number; delay_direction?: "before" | "after"; delay_full?: { delay_type: string; delay_unit: string; delay_value: number; delay_direction: string; }; trigger_settings?: { workflow_type: string; workflow_title?: string; runtime?: { days?: number[]; hours?: number[]; }; one_time?: boolean; one_time_date?: string; }; tracking?: { opens: boolean; html_clicks: boolean; text_clicks: boolean; goal_tracking: boolean; ecomm360: boolean; google_analytics: string; clicktale: string; salesforce?: { campaign: boolean; notes: boolean; }; capsule?: { notes: boolean; }; }; settings?: { title: string; from_name: string; reply_to: string; use_conversation: boolean; to_name: string; folder_id: string; authenticate: boolean; auto_footer: boolean; inline_css: boolean; auto_tweet: boolean; fb_comments: boolean; timewarp: boolean; template_id: number; drag_and_drop: boolean; }; social_card?: { image_url?: string; description?: string; title?: string; }; trigger_settings_workflow_type?: string; trigger_settings_workflow_title?: string; trigger_settings_runtime?: { days?: number[]; hours?: number[]; }; trigger_settings_one_time?: boolean; trigger_settings_one_time_date?: string; report_summary?: { opens: number; unique_opens: number; open_rate: number; clicks: number; subscriber_clicks: number; click_rate: number; visits: number; unique_visits: number; conversion_rate: number; subscribes: number; ecommerce?: { total_revenue: number; currency_code: string; average_order_revenue: number; total_orders: number; total_products_sold: number; }; }; _links?: Array<{ rel: string; href: string; method: string; targetSchema?: string; schema?: string; }>; }