Skip to main content
Glama
AgentX-ai

Mailchimp MCP Server

by AgentX-ai

list_orders

Retrieve all orders from a Mailchimp store to track purchases and manage customer transactions.

Instructions

List all orders in a store

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
store_idYesThe store ID

Implementation Reference

  • Tool definition and registration in getToolDefinitions, including name, description, and input schema for validation.
    { name: "list_orders", description: "List all orders in a store", inputSchema: { type: "object", properties: { store_id: { type: "string", description: "The store ID", }, }, required: ["store_id"], }, },
  • The handler logic in handleToolCall that processes the tool call, invokes the service, and formats the response as JSON.
    case "list_orders": const orders = await service.listOrders(args.store_id); return { content: [ { type: "text", text: JSON.stringify( orders.orders.map((o) => ({ id: o.id, order_total: o.order_total, currency_code: o.currency_code, financial_status: o.financial_status, })), null, 2 ), }, ], };
  • Helper method in MailchimpService that performs the paginated API request to fetch orders from Mailchimp e-commerce endpoint.
    async listOrders(storeId: string): Promise<{ orders: MailchimpOrder[] }> { return await this.makePaginatedRequest( `/ecommerce/stores/${storeId}/orders`, "processed_at_foreign", "DESC" ); }

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