Skip to main content
Glama

add_or_update_member

Add new subscribers or update existing ones in Mailchimp lists, manage subscription status and tags.

Instructions

Add a new subscriber or update if exists (upsert). Status: subscribed, pending, unsubscribed. Tags: comma-separated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
list_idYes
emailYes
statusNosubscribed
first_nameNo
last_nameNo
tagsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `add_or_update_member` tool handler is implemented in `mcp_mailchimp/server.py` using `@mcp.tool()` to expose it to the MCP protocol. It performs an upsert operation on a Mailchimp list member using the Mailchimp API.
    @mcp.tool()
    async def add_or_update_member(
        list_id: str,
        email: str,
        status: str = "subscribed",
        first_name: str = "",
        last_name: str = "",
        tags: str = "",
    ) -> str:
        """Add a new subscriber or update if exists (upsert). Status: subscribed, pending, unsubscribed. Tags: comma-separated."""
        mc = get_client()
        h = mc.subscriber_hash(email)
        body: dict[str, Any] = {
            "email_address": email.lower().strip(),
            "status_if_new": status,
        }
        merge_fields: dict[str, str] = {}
        if first_name:
            merge_fields["FNAME"] = first_name
        if last_name:
            merge_fields["LNAME"] = last_name
        if merge_fields:
            body["merge_fields"] = merge_fields
        if tags:
            body["tags"] = [t.strip() for t in tags.split(",") if t.strip()]
        m = await mc.put(f"/lists/{list_id}/members/{h}", json=body)
        return _fmt({
            "email": m.get("email_address", ""),
            "status": m.get("status", ""),
            "id": m.get("id", ""),
            "message": "Member added/updated.",
        })
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions status options (subscribed, pending, unsubscribed) and tag format (comma-separated), which adds some context. However, it doesn't cover critical behavioral aspects like required permissions, rate limits, idempotency of upsert, error handling, or what the output contains. For a mutation tool with zero annotation coverage, this is insufficient.

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

Conciseness4/5

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

The description is appropriately concise with two sentences that directly convey key information: the upsert operation and parameter details. It's front-loaded with the core purpose. No wasted words, though it could be slightly more structured by separating parameter explanations.

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's complexity (6 parameters, mutation operation) and lack of annotations, the description is moderately complete. It covers the upsert behavior and some parameter semantics, and an output schema exists (though not provided here), reducing the need to explain return values. However, it misses critical context like permissions, error cases, and sibling tool differentiation, making it adequate but with clear 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 0%, so the description must compensate. It adds meaning for 'status' by listing possible values and for 'tags' by specifying format (comma-separated). However, it doesn't explain other parameters like 'list_id', 'email', 'first_name', or 'last_name', leaving half the parameters without semantic clarification. This partial compensation justifies a baseline score.

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 tool's purpose: 'Add a new subscriber or update if exists (upsert).' It specifies the verb (add/update) and resource (subscriber/member), though it doesn't explicitly differentiate from siblings like 'manage_member_tags' or 'archive_member'. The mention of 'upsert' is a helpful technical detail.

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 doesn't mention prerequisites, compare with sibling tools like 'manage_member_tags' or 'archive_member', or specify scenarios where this upsert operation is preferred over separate create/update tools. Usage is implied but not explicitly stated.

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

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