Skip to main content
Glama
AgentX-ai

Mailchimp MCP Server

by AgentX-ai

list_lists

Retrieve all email lists from your Mailchimp account to manage automation recipients and audience segments.

Instructions

List all lists in your Mailchimp account (for automation recipients)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_lists' tool within the handleToolCall switch statement. It calls the service's listLists method and formats a JSON response with key list details.
    case "list_lists":
      const lists = await service.listLists();
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              lists.lists.map((l) => ({
                id: l.id,
                name: l.name,
                member_count: l.stats.member_count,
                date_created: l.date_created,
              })),
              null,
              2
            ),
          },
        ],
      };
  • Tool registration in the getToolDefinitions array, including name, description, and empty input schema (no parameters required).
    {
      name: "list_lists",
      description:
        "List all lists in your Mailchimp account (for automation recipients)",
      inputSchema: {
        type: "object",
        properties: {},
        required: [],
      },
    },
  • Helper method in MailchimpService that fetches the paginated list of Mailchimp lists from the API endpoint '/lists'.
    async listLists(): Promise<{ lists: MailchimpList[] }> {
      return await this.makePaginatedRequest("/lists", "date_created", "DESC");
    }
  • TypeScript interface defining the structure of a MailchimpList object, used in the return type of listLists() and mapped in the handler response.
    export interface MailchimpList {
      id: string;
      name: string;
      contact: {
        company: string;
        address1: string;
        address2: string;
        city: string;
        state: string;
        zip: string;
        country: string;
        phone: string;
      };
      permission_reminder: string;
      use_archive_bar: boolean;
      campaign_defaults: {
        from_name: string;
        from_email: string;
        subject: string;
        language: string;
      };
      notify_on_subscribe: string;
      notify_on_unsubscribe: string;
      date_created: string;
      list_rating: number;
      email_type_option: boolean;
      subscribe_url_short: string;
      subscribe_url_long: string;
      beamer_address: string;
      visibility: string;
      double_optin: boolean;
      marketing_permissions: boolean;
      modules: string[];
      stats: {
        member_count: number;
        unsubscribe_count: number;
        cleaned_count: number;
        member_count_since_send: number;
        unsubscribe_count_since_send: number;
        cleaned_count_since_send: number;
        campaign_count: number;
        campaign_last_sent: string;
        merge_field_count: number;
        avg_sub_rate: number;
        avg_unsub_rate: number;
        target_sub_rate: number;
        open_rate: number;
        click_rate: number;
        last_sub_date: string;
        last_unsub_date: 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 the full burden of behavioral disclosure. It mentions the tool lists 'all lists' but doesn't specify behavioral traits like pagination, rate limits, authentication needs, or what the output format looks like. For a read operation with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.

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 purpose ('List all lists in your Mailchimp account') and adds a brief clarifying note ('for automation recipients'). There is no wasted verbiage, and every part of the sentence contributes meaning.

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

Completeness3/5

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

Given the tool has 0 parameters, no annotations, and no output schema, the description is minimally adequate but lacks completeness. It states what the tool does but doesn't cover behavioral aspects like output format or usage constraints, which are important for a tool that likely returns a list of resources. The context is sufficient for basic understanding but incomplete for reliable agent invocation.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, and the baseline for this scenario is 4, as it avoids unnecessary repetition of schema information.

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 lists in your Mailchimp account'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_list' (which likely retrieves a single list), though the 'list_' prefix pattern across siblings provides some implicit distinction.

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 includes a parenthetical note 'for automation recipients', which implies usage context related to automation workflows. However, it doesn't provide explicit guidance on when to use this tool versus alternatives like 'get_list' or other list-related tools, nor does it specify any prerequisites or exclusions.

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