Skip to main content
Glama

get_segment_members

Retrieve members from a specific Mailchimp audience segment to manage targeted communications and analyze subscriber groups.

Instructions

List members in a specific segment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
list_idYes
segment_idYes
countNo
offsetNo

Implementation Reference

  • Handler function for 'get_segment_members' tool which fetches member data from a specific Mailchimp segment.
    async def get_segment_members(
        list_id: str,
        segment_id: str,
        count: int = 20,
        offset: int = 0,
    ) -> str:
        """List members in a specific segment."""
        mc = get_client()
        data = await mc.get(
            f"/lists/{list_id}/segments/{segment_id}/members",
            params={"count": min(count, 100), "offset": offset},
        )
        members = []
        for m in data.get("members", []):
            members.append({
                "email": m.get("email_address", ""),
                "full_name": m.get("full_name", ""),
                "status": m.get("status", ""),
            })
        return _fmt({"total_items": data.get("total_items", 0), "members": members})

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