Skip to main content
Glama

create_audience

Create a new Mailchimp audience/list for email marketing campaigns by specifying audience name, sender email, and company details.

Instructions

Create a new audience/list. Requires name, sender email, and company name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
from_emailYes
companyYes
permission_reminderNoYou signed up on our website.
from_nameNo
countryNoUS

Implementation Reference

  • The implementation of the 'create_audience' tool, which takes audience details and posts to the Mailchimp '/lists' endpoint. The registration is implied by the @mcp.tool() decorator, although the decorator appears to be just above the function definition (line 417).
    async def create_audience(
        name: str,
        from_email: str,
        company: str,
        permission_reminder: str = "You signed up on our website.",
        from_name: str = "",
        country: str = "US",
    ) -> str:
        """Create a new audience/list. Requires name, sender email, and company name."""
        mc = get_client()
        body = {
            "name": name,
            "permission_reminder": permission_reminder,
            "email_type_option": True,
            "contact": {
                "company": company,
                "address1": "",
                "city": "",
                "state": "",
                "zip": "",
                "country": country,
            },
            "campaign_defaults": {
                "from_name": from_name or company,
                "from_email": from_email,
                "subject": "",
                "language": "en",
            },
        }
        a = await mc.post("/lists", json=body)
        return _fmt({
            "id": a["id"],
            "name": a.get("name", ""),
            "message": "Audience created.",
        })

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