Skip to main content
Glama
AgentX-ai

Mailchimp MCP Server

by AgentX-ai

get_automation_email

Retrieve specific email details from a Mailchimp automation workflow to analyze content and configuration.

Instructions

Get details of a specific email in an automation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflow_idYesThe workflow ID of the automation
email_idYesThe email ID within the automation

Implementation Reference

  • Handler for the 'get_automation_email' tool call. Extracts workflow_id and email_id from args, calls MailchimpService.getAutomationEmail, and returns the email details as a JSON-formatted text response.
    case "get_automation_email":
      const email = await service.getAutomationEmail(
        args.workflow_id,
        args.email_id
      );
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(email, null, 2),
          },
        ],
      };
  • Input schema definition for the 'get_automation_email' tool, specifying required workflow_id and email_id parameters.
    {
      name: "get_automation_email",
      description: "Get details of a specific email in an automation",
      inputSchema: {
        type: "object",
        properties: {
          workflow_id: {
            type: "string",
            description: "The workflow ID of the automation",
          },
          email_id: {
            type: "string",
            description: "The email ID within the automation",
          },
        },
        required: ["workflow_id", "email_id"],
      },
    },
  • The getToolDefinitions function registers the 'get_automation_email' tool by including it in the array of tool definitions returned for MCP tool registration.
    export const getToolDefinitions = (service: MailchimpService) => [
      {
        name: "list_automations",
        description: "List all automations in your Mailchimp account",
        inputSchema: {
          type: "object",
          properties: {},
          required: [],
        },
      },
      {
        name: "get_automation",
        description: "Get details of a specific automation by workflow ID",
        inputSchema: {
          type: "object",
          properties: {
            workflow_id: {
              type: "string",
              description: "The workflow ID of the automation",
            },
          },
          required: ["workflow_id"],
        },
      },
      {
        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"],
        },
      },
      {
        name: "get_automation_email",
        description: "Get details of a specific email in an automation",
        inputSchema: {
          type: "object",
          properties: {
            workflow_id: {
              type: "string",
              description: "The workflow ID of the automation",
            },
            email_id: {
              type: "string",
              description: "The email ID within the automation",
            },
          },
          required: ["workflow_id", "email_id"],
        },
      },
      {
        name: "list_automation_subscribers",
        description: "List subscribers in an automation email queue",
        inputSchema: {
          type: "object",
          properties: {
            workflow_id: {
              type: "string",
              description: "The workflow ID of the automation",
            },
            email_id: {
              type: "string",
              description: "The email ID within the automation",
            },
          },
          required: ["workflow_id", "email_id"],
        },
      },
      {
        name: "get_automation_queue",
        description: "Get the automation email queue",
        inputSchema: {
          type: "object",
          properties: {
            workflow_id: {
              type: "string",
              description: "The workflow ID of the automation",
            },
            email_id: {
              type: "string",
              description: "The email ID within the automation",
            },
          },
          required: ["workflow_id", "email_id"],
        },
      },
      {
        name: "list_lists",
        description:
          "List all lists in your Mailchimp account (for automation recipients)",
        inputSchema: {
          type: "object",
          properties: {},
          required: [],
        },
      },
      {
        name: "get_list",
        description: "Get details of a specific list",
        inputSchema: {
          type: "object",
          properties: {
            list_id: {
              type: "string",
              description: "The list ID",
            },
          },
          required: ["list_id"],
        },
      },
      {
        name: "get_automation_report",
        description: "Get automation report data",
        inputSchema: {
          type: "object",
          properties: {
            workflow_id: {
              type: "string",
              description: "The workflow ID of the automation",
            },
          },
          required: ["workflow_id"],
        },
      },
      {
        name: "get_automation_email_report",
        description: "Get automation email report data",
        inputSchema: {
          type: "object",
          properties: {
            workflow_id: {
              type: "string",
              description: "The workflow ID of the automation",
            },
            email_id: {
              type: "string",
              description: "The email ID within the automation",
            },
          },
          required: ["workflow_id", "email_id"],
        },
      },
      {
        name: "get_subscriber_activity",
        description: "Get subscriber activity for an automation email",
        inputSchema: {
          type: "object",
          properties: {
            workflow_id: {
              type: "string",
              description: "The workflow ID of the automation",
            },
            email_id: {
              type: "string",
              description: "The email ID within the automation",
            },
            subscriber_hash: {
              type: "string",
              description: "The subscriber hash",
            },
          },
          required: ["workflow_id", "email_id", "subscriber_hash"],
        },
      },
      // Campaign Management
      {
        name: "list_campaigns",
        description: "List all campaigns in your Mailchimp account",
        inputSchema: {
          type: "object",
          properties: {},
          required: [],
        },
      },
      {
        name: "get_campaign",
        description: "Get details of a specific campaign",
        inputSchema: {
          type: "object",
          properties: {
            campaign_id: {
              type: "string",
              description: "The campaign ID",
            },
          },
          required: ["campaign_id"],
        },
      },
      // Member Management
      {
        name: "list_members",
        description: "List all members in a specific list",
        inputSchema: {
          type: "object",
          properties: {
            list_id: {
              type: "string",
              description: "The list ID",
            },
          },
          required: ["list_id"],
        },
      },
      {
        name: "get_member",
        description: "Get details of a specific member",
        inputSchema: {
          type: "object",
          properties: {
            list_id: {
              type: "string",
              description: "The list ID",
            },
            subscriber_hash: {
              type: "string",
              description: "The subscriber hash",
            },
          },
          required: ["list_id", "subscriber_hash"],
        },
      },
      // Segment Management
      {
        name: "list_segments",
        description: "List all segments in a specific list",
        inputSchema: {
          type: "object",
          properties: {
            list_id: {
              type: "string",
              description: "The list ID",
            },
          },
          required: ["list_id"],
        },
      },
      {
        name: "get_segment",
        description: "Get details of a specific segment",
        inputSchema: {
          type: "object",
          properties: {
            list_id: {
              type: "string",
              description: "The list ID",
            },
            segment_id: {
              type: "number",
              description: "The segment ID",
            },
          },
          required: ["list_id", "segment_id"],
        },
      },
      // Template Management
      {
        name: "list_templates",
        description: "List all templates in your Mailchimp account",
        inputSchema: {
          type: "object",
          properties: {},
          required: [],
        },
      },
      {
        name: "get_template",
        description: "Get details of a specific template",
        inputSchema: {
          type: "object",
          properties: {
            template_id: {
              type: "number",
              description: "The template ID",
            },
          },
          required: ["template_id"],
        },
      },
      // Campaign Reports
      {
        name: "list_campaign_reports",
        description: "List all campaign reports",
        inputSchema: {
          type: "object",
          properties: {},
          required: [],
        },
      },
      {
        name: "get_campaign_report",
        description: "Get detailed report for a specific campaign",
        inputSchema: {
          type: "object",
          properties: {
            campaign_id: {
              type: "string",
              description: "The campaign ID",
            },
          },
          required: ["campaign_id"],
        },
      },
      // Account Information
      {
        name: "get_account",
        description: "Get account information",
        inputSchema: {
          type: "object",
          properties: {},
          required: [],
        },
      },
      // Folder Management
      {
        name: "list_folders",
        description: "List all campaign folders",
        inputSchema: {
          type: "object",
          properties: {},
          required: [],
        },
      },
      {
        name: "get_folder",
        description: "Get details of a specific folder",
        inputSchema: {
          type: "object",
          properties: {
            folder_id: {
              type: "string",
              description: "The folder ID",
            },
          },
          required: ["folder_id"],
        },
      },
      // Merge Fields
      {
        name: "list_merge_fields",
        description: "List all merge fields in a specific list",
        inputSchema: {
          type: "object",
          properties: {
            list_id: {
              type: "string",
              description: "The list ID",
            },
          },
          required: ["list_id"],
        },
      },
      {
        name: "get_merge_field",
        description: "Get details of a specific merge field",
        inputSchema: {
          type: "object",
          properties: {
            list_id: {
              type: "string",
              description: "The list ID",
            },
            merge_field_id: {
              type: "number",
              description: "The merge field ID",
            },
          },
          required: ["list_id", "merge_field_id"],
        },
      },
      // File Manager
      {
        name: "list_files",
        description: "List all files in the File Manager",
        inputSchema: {
          type: "object",
          properties: {},
          required: [],
        },
      },
      {
        name: "get_file",
        description: "Get details of a specific file",
        inputSchema: {
          type: "object",
          properties: {
            file_id: {
              type: "string",
              description: "The file ID",
            },
          },
          required: ["file_id"],
        },
      },
      // Landing Pages
      {
        name: "list_landing_pages",
        description: "List all landing pages",
        inputSchema: {
          type: "object",
          properties: {},
          required: [],
        },
      },
      {
        name: "get_landing_page",
        description: "Get details of a specific landing page",
        inputSchema: {
          type: "object",
          properties: {
            page_id: {
              type: "string",
              description: "The landing page ID",
            },
          },
          required: ["page_id"],
        },
      },
      // E-commerce Stores
      {
        name: "list_stores",
        description: "List all e-commerce stores",
        inputSchema: {
          type: "object",
          properties: {},
          required: [],
        },
      },
      {
        name: "get_store",
        description: "Get details of a specific store",
        inputSchema: {
          type: "object",
          properties: {
            store_id: {
              type: "string",
              description: "The store ID",
            },
          },
          required: ["store_id"],
        },
      },
      // E-commerce Products
      {
        name: "list_products",
        description: "List all products in a store",
        inputSchema: {
          type: "object",
          properties: {
            store_id: {
              type: "string",
              description: "The store ID",
            },
          },
          required: ["store_id"],
        },
      },
      {
        name: "get_product",
        description: "Get details of a specific product",
        inputSchema: {
          type: "object",
          properties: {
            store_id: {
              type: "string",
              description: "The store ID",
            },
            product_id: {
              type: "string",
              description: "The product ID",
            },
          },
          required: ["store_id", "product_id"],
        },
      },
      // E-commerce Orders
      {
        name: "list_orders",
        description: "List all orders in a store",
        inputSchema: {
          type: "object",
          properties: {
            store_id: {
              type: "string",
              description: "The store ID",
            },
          },
          required: ["store_id"],
        },
      },
      {
        name: "get_order",
        description: "Get details of a specific order",
        inputSchema: {
          type: "object",
          properties: {
            store_id: {
              type: "string",
              description: "The store ID",
            },
            order_id: {
              type: "string",
              description: "The order ID",
            },
          },
          required: ["store_id", "order_id"],
        },
      },
      // Conversations
      {
        name: "list_conversations",
        description: "List all conversations",
        inputSchema: {
          type: "object",
          properties: {},
          required: [],
        },
      },
      {
        name: "get_conversation",
        description: "Get details of a specific conversation",
        inputSchema: {
          type: "object",
          properties: {
            conversation_id: {
              type: "string",
              description: "The conversation ID",
            },
          },
          required: ["conversation_id"],
        },
      },
    ];
  • Helper method in MailchimpService that makes the API request to retrieve details of a specific automation email from Mailchimp.
    async getAutomationEmail(
      workflowId: string,
      emailId: string
    ): Promise<MailchimpAutomationEmail> {
      return await this.makeRequest(
        `/automations/${workflowId}/emails/${emailId}`
      );
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Get details' but does not describe what details are returned, whether it's a read-only operation, error handling, or any constraints like rate limits. This is a significant gap for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and appropriately sized, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete. It does not explain what details are returned, error conditions, or behavioral traits, which is inadequate for a tool that retrieves specific data. More context is needed to fully understand its operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with clear descriptions for 'workflow_id' and 'email_id'. The description does not add any meaning beyond the schema, such as explaining parameter relationships or formats, so it meets the baseline of 3 where the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get details') and resource ('a specific email in an automation'), making the purpose understandable. However, it does not explicitly differentiate from sibling tools like 'list_automation_emails' (which likely lists emails) or 'get_automation' (which might get automation details), so it lacks sibling differentiation for a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites, context, or exclusions, such as when to use 'list_automation_emails' for listing emails or 'get_automation' for broader automation details, leaving usage unclear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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