Skip to main content
Glama
AgentX-ai

Mailchimp MCP Server

by AgentX-ai

list_conversations

Retrieve all email conversations from your Mailchimp account to monitor customer interactions and track communication history.

Instructions

List all conversations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler implementing the tool logic: fetches conversations from Mailchimp API using paginated request to /conversations endpoint.
    async listConversations(): Promise<{
      conversations: MailchimpConversation[];
    }> {
      return await this.makePaginatedRequest(
        "/conversations",
        "timestamp",
        "DESC"
      );
    }
  • Tool registration in getToolDefinitions: defines name, description, and empty input schema for MCP tool listing.
    {
      name: "list_conversations",
      description: "List all conversations",
      inputSchema: {
        type: "object",
        properties: {},
        required: [],
      },
    },
  • Dispatcher handler in handleToolCall: calls service.listConversations() and returns formatted JSON summary of conversations.
    case "list_conversations":
      const conversations = await service.listConversations();
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              conversations.conversations.map((c) => ({
                id: c.id,
                subject: c.subject,
                from_email: c.from_email,
                timestamp: c.timestamp,
              })),
              null,
              2
            ),
          },
        ],
      };
  • Type definition for MailchimpConversation used in the output type of listConversations().
    export interface MailchimpConversation {
      id: string;
      message_id: string;
      list_id: string;
      from_email: string;
      from_label: string;
      subject: string;
      message: string;
      read: boolean;
      timestamp: string;
      _links?: Array<{
        rel: string;
        href: string;
        method: string;
        targetSchema?: string;
        schema?: string;
      }>;
    }

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