Skip to main content
Glama
AgentX-ai

Mailchimp MCP Server

by AgentX-ai

get_automation

Retrieve specific automation workflow details from Mailchimp by providing the workflow ID to access email marketing campaign information.

Instructions

Get details of a specific automation by workflow ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflow_idYesThe workflow ID of the automation

Implementation Reference

  • The handler logic for the 'get_automation' tool within the handleToolCall function. It invokes the MailchimpService.getAutomation method and returns the result as a formatted JSON text response.
    case "get_automation":
      const automation = await service.getAutomation(args.workflow_id);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(automation, null, 2),
          },
        ],
      };
  • Input schema definition for the 'get_automation' tool, specifying the required 'workflow_id' parameter.
    {
      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"],
      },
    },
  • Helper method in MailchimpService that performs the actual API call to retrieve automation details from Mailchimp using the provided workflowId.
    async getAutomation(workflowId: string): Promise<MailchimpAutomation> {
      return await this.makeRequest(`/automations/${workflowId}`);
    }
  • The getToolDefinitions function registers all tools including 'get_automation' by returning an array of tool definitions used 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"],
        },
      },
    ];
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states it 'gets details' which implies a read-only operation, but doesn't disclose behavioral traits like authentication needs, rate limits, error handling, or what 'details' includes. For a tool with no annotations, this is a significant gap in transparency.

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 front-loads the core action and resource. There is zero waste, making it highly concise and well-structured for quick understanding.

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 doesn't explain what 'details' are returned, error conditions, or other contextual nuances needed for effective tool use. For a read operation with no structured output documentation, this leaves significant gaps.

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?

Schema description coverage is 100%, with the single parameter 'workflow_id' fully documented in the schema. The description adds no additional meaning beyond implying the parameter is used to identify the automation, which is already clear from the schema. Baseline 3 is appropriate as 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 verb ('Get details') and resource ('a specific automation'), making the purpose understandable. It distinguishes from list_automations by specifying retrieval of a single item by ID, though it doesn't explicitly contrast with get_automation_email or other get_automation_* siblings beyond the resource focus.

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

Usage Guidelines3/5

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

The description implies usage when you need details for a specific automation identified by workflow ID, but it doesn't explicitly state when to use this versus alternatives like list_automations or other get_automation_* tools. No exclusions or prerequisites are mentioned, leaving some ambiguity in context.

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