Skip to main content
Glama
AgentX-ai

Mailchimp MCP Server

by AgentX-ai

list_members

Retrieve all subscribers from a specific Mailchimp email list using the list ID to manage audience data.

Instructions

List all members in a specific list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
list_idYesThe list ID

Implementation Reference

  • The handler for the 'list_members' tool call. It invokes MailchimpService.listMembers with the provided list_id, maps the members data, and returns formatted text content for the MCP response.
    case "list_members":
      const members = await service.listMembers(args.list_id);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              members.members.map((m) => ({
                id: m.id,
                email_address: m.email_address,
                status: m.status,
                member_rating: m.member_rating,
                last_changed: m.last_changed,
              })),
              null,
              2
            ),
          },
        ],
      };
  • Input schema definition for the 'list_members' tool, specifying the required 'list_id' parameter.
    {
      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"],
      },
  • src/index.ts:42-46 (registration)
    Registers all tools, including 'list_members', by providing the tool definitions from getToolDefinitions in response to ListToolsRequest.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: getToolDefinitions(mailchimpService),
      };
    });
  • Helper method in MailchimpService that makes a paginated API request to retrieve members from a specified Mailchimp list.
    async listMembers(listId: string): Promise<{ members: MailchimpMember[] }> {
      return await this.makePaginatedRequest(
        `/lists/${listId}/members`,
        "timestamp_signup",
        "DESC"
      );
    }
  • TypeScript interface defining the structure of a MailchimpMember, used for typing the output of listMembers.
    export interface MailchimpMember {
      id: string;
      email_address: string;
      unique_email_id: string;
      email_type: string;
      status:
        | "subscribed"
        | "unsubscribed"
        | "cleaned"
        | "pending"
        | "transactional";
      merge_fields: Record<string, any>;
      interests: Record<string, boolean>;
      stats: {
        avg_open_rate: number;
        avg_click_rate: number;
        ecommerce_data?: {
          total_revenue: number;
          number_of_orders: number;
          currency_code: string;
        };
      };
      ip_signup?: string;
      timestamp_signup?: string;
      ip_opt?: string;
      timestamp_opt?: string;
      member_rating: number;
      last_changed: string;
      language?: string;
      vip: boolean;
      email_client?: string;
      location?: {
        latitude: number;
        longitude: number;
        gmtoff: number;
        dstoff: number;
        country_code: string;
        timezone: string;
        region: string;
      };
      source?: string;
      tags_count: number;
      tags: Array<{
        id: number;
        name: string;
      }>;
      list_id: string;
      _links?: Array<{
        rel: string;
        href: string;
        method: string;
        targetSchema?: string;
        schema?: string;
      }>;
    }
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 the action but lacks behavioral details such as pagination, rate limits, authentication requirements, or what 'list all members' entails (e.g., if it returns all at once or in batches). 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 for a simple tool, with zero waste.

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, no output schema, and a simple input schema, the description is incomplete. It lacks details on behavioral aspects (e.g., response format, error handling) and usage context, making it inadequate for full agent understanding despite the tool's low complexity.

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%, so the schema already documents the 'list_id' parameter. The description adds minimal value by implying the parameter is used to specify the list, but does not provide additional context like format examples or constraints beyond what the schema states, meeting the baseline for high coverage.

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 ('List') and resource ('all members in a specific list'), making the purpose unambiguous. However, it does not differentiate from sibling tools like 'get_member' (which likely retrieves a single member) or 'list_lists' (which lists lists rather than members), missing explicit sibling distinction.

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 (e.g., needing a valid list ID), exclusions, or comparisons to siblings like 'get_member' for single-member retrieval, leaving usage context implied but unspecified.

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