Skip to main content
Glama
dazanza
by dazanza

batch_add_members

Add up to 500 subscribers to a Mailchimp audience in a single operation while preserving existing subscription statuses.

Instructions

Add multiple subscribers to a Mailchimp audience in one call. Handles up to 500 members per batch. Will not overwrite existing members' subscription status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
list_idYesAudience/list ID
membersYesArray of contacts to add (max 500)
update_existingNoUpdate merge fields for existing members (default false)

Implementation Reference

  • The handler function for the batch_add_members tool, which processes the members array and calls mailchimp.lists.batchListMembers.
    async ({ list_id, members, update_existing }) => {
      const batch = members.map((m) => ({
        email_address: m.email,
        status_if_new: "subscribed",
        merge_fields: {
          ...(m.first_name ? { FNAME: m.first_name } : {}),
          ...(m.last_name ? { LNAME: m.last_name } : {}),
        },
      }));
      const result = await mailchimp.lists.batchListMembers(list_id, {
        members: batch,
        update_existing: update_existing || false,
      });
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              {
                total_created: result.total_created,
                total_updated: result.total_updated,
                error_count: result.error_count,
                errors: result.errors.slice(0, 10).map((e) => ({ email: e.email_address, error: e.error })),
              },
              null,
              2
            ),
          },
        ],
  • server.js:386-401 (registration)
    Registration of the batch_add_members tool with its schema definition in server.js.
    server.tool(
      "batch_add_members",
      "Add multiple subscribers to a Mailchimp audience in one call. Handles up to 500 members per batch. Will not overwrite existing members' subscription status.",
      {
        list_id: z.string().describe("Audience/list ID"),
        members: z
          .array(
            z.object({
              email: z.string().describe("Email address"),
              first_name: z.string().optional().describe("First name"),
              last_name: z.string().optional().describe("Last name"),
            })
          )
          .describe("Array of contacts to add (max 500)"),
        update_existing: z.boolean().optional().describe("Update merge fields for existing members (default false)"),
      },
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by disclosing key behavioral traits: the 500-member limit, non-destructive behavior regarding existing subscription status, and the fact that it's a batch operation. However, it doesn't mention authentication requirements, rate limits, or error handling.

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 perfectly concise with two sentences that each earn their place: the first establishes purpose and scope, the second provides important behavioral constraints. No wasted words, well front-loaded with essential information.

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

Completeness4/5

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

For a mutation tool with no annotations and no output schema, the description does well by covering purpose, constraints, and key behavior. However, it doesn't mention what the tool returns (success/failure indicators, error responses) or provide complete parameter guidance beyond what the schema offers, leaving some gaps for an AI agent.

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?

With 100% schema description coverage, the baseline is 3. The description adds some context about the 'members' parameter ('up to 500 members per batch') and implies behavior for 'update_existing' ('Will not overwrite existing members' subscription status'), but doesn't provide significant additional meaning beyond what the schema already documents.

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

Purpose5/5

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

The description clearly states the specific action ('Add multiple subscribers'), resource ('to a Mailchimp audience'), and scope ('in one call'), distinguishing it from the sibling 'add_or_update_member' which handles individual members rather than batches.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool (batch operations up to 500 members) and implicitly suggests an alternative (the sibling 'add_or_update_member' for individual operations), but doesn't explicitly state when NOT to use it or compare directly with other batch alternatives.

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/dazanza/mailchimp-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server