get_product
Retrieve detailed product information from a Mailchimp store by providing the store ID and product ID for email marketing data access.
Instructions
Get details of a specific product
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| store_id | Yes | The store ID | |
| product_id | Yes | The product ID |
Implementation Reference
- src/tools/index.ts:1091-1100 (handler)Handler implementation for the 'get_product' tool within the handleToolCall switch statement. It invokes the service method with store_id and product_id arguments and returns the product data as a JSON-formatted text response.case "get_product": const product = await service.getProduct(args.store_id, args.product_id); return { content: [ { type: "text", text: JSON.stringify(product, null, 2), }, ], };
- src/tools/index.ts:465-482 (schema)Input schema definition for the 'get_product' tool, specifying required store_id and product_id parameters.{ name: "get_product", description: "Get details of a specific product", inputSchema: { type: "object", properties: { store_id: { type: "string", description: "The store ID", }, product_id: { type: "string", description: "The product ID", }, }, required: ["store_id", "product_id"], }, },
- src/tools/index.ts:3-540 (registration)The getToolDefinitions function registers all tools including 'get_product' by returning an array of tool definitions used for MCP tool exposure.export const getToolDefinitions = (service: MailchimpService) => [ { name: "list_automations", description: "List all automations in your Mailchimp account", inputSchema: { type: "object", properties: {}, required: [], }, }, { name: "get_automation", description: "Get details of a specific automation by workflow ID", inputSchema: { type: "object", properties: { workflow_id: { type: "string", description: "The workflow ID of the automation", }, }, required: ["workflow_id"], }, }, { name: "list_automation_emails", description: "List all emails in an automation", inputSchema: { type: "object", properties: { workflow_id: { type: "string", description: "The workflow ID of the automation", }, }, required: ["workflow_id"], }, }, { name: "get_automation_email", description: "Get details of a specific email in an automation", inputSchema: { type: "object", properties: { workflow_id: { type: "string", description: "The workflow ID of the automation", }, email_id: { type: "string", description: "The email ID within the automation", }, }, required: ["workflow_id", "email_id"], }, }, { name: "list_automation_subscribers", description: "List subscribers in an automation email queue", inputSchema: { type: "object", properties: { workflow_id: { type: "string", description: "The workflow ID of the automation", }, email_id: { type: "string", description: "The email ID within the automation", }, }, required: ["workflow_id", "email_id"], }, }, { name: "get_automation_queue", description: "Get the automation email queue", inputSchema: { type: "object", properties: { workflow_id: { type: "string", description: "The workflow ID of the automation", }, email_id: { type: "string", description: "The email ID within the automation", }, }, required: ["workflow_id", "email_id"], }, }, { name: "list_lists", description: "List all lists in your Mailchimp account (for automation recipients)", inputSchema: { type: "object", properties: {}, required: [], }, }, { name: "get_list", description: "Get details of a specific list", inputSchema: { type: "object", properties: { list_id: { type: "string", description: "The list ID", }, }, required: ["list_id"], }, }, { name: "get_automation_report", description: "Get automation report data", inputSchema: { type: "object", properties: { workflow_id: { type: "string", description: "The workflow ID of the automation", }, }, required: ["workflow_id"], }, }, { name: "get_automation_email_report", description: "Get automation email report data", inputSchema: { type: "object", properties: { workflow_id: { type: "string", description: "The workflow ID of the automation", }, email_id: { type: "string", description: "The email ID within the automation", }, }, required: ["workflow_id", "email_id"], }, }, { name: "get_subscriber_activity", description: "Get subscriber activity for an automation email", inputSchema: { type: "object", properties: { workflow_id: { type: "string", description: "The workflow ID of the automation", }, email_id: { type: "string", description: "The email ID within the automation", }, subscriber_hash: { type: "string", description: "The subscriber hash", }, }, required: ["workflow_id", "email_id", "subscriber_hash"], }, }, // Campaign Management { name: "list_campaigns", description: "List all campaigns in your Mailchimp account", inputSchema: { type: "object", properties: {}, required: [], }, }, { name: "get_campaign", description: "Get details of a specific campaign", inputSchema: { type: "object", properties: { campaign_id: { type: "string", description: "The campaign ID", }, }, required: ["campaign_id"], }, }, // Member Management { name: "list_members", description: "List all members in a specific list", inputSchema: { type: "object", properties: { list_id: { type: "string", description: "The list ID", }, }, required: ["list_id"], }, }, { name: "get_member", description: "Get details of a specific member", inputSchema: { type: "object", properties: { list_id: { type: "string", description: "The list ID", }, subscriber_hash: { type: "string", description: "The subscriber hash", }, }, required: ["list_id", "subscriber_hash"], }, }, // Segment Management { name: "list_segments", description: "List all segments in a specific list", inputSchema: { type: "object", properties: { list_id: { type: "string", description: "The list ID", }, }, required: ["list_id"], }, }, { name: "get_segment", description: "Get details of a specific segment", inputSchema: { type: "object", properties: { list_id: { type: "string", description: "The list ID", }, segment_id: { type: "number", description: "The segment ID", }, }, required: ["list_id", "segment_id"], }, }, // Template Management { name: "list_templates", description: "List all templates in your Mailchimp account", inputSchema: { type: "object", properties: {}, required: [], }, }, { name: "get_template", description: "Get details of a specific template", inputSchema: { type: "object", properties: { template_id: { type: "number", description: "The template ID", }, }, required: ["template_id"], }, }, // Campaign Reports { name: "list_campaign_reports", description: "List all campaign reports", inputSchema: { type: "object", properties: {}, required: [], }, }, { name: "get_campaign_report", description: "Get detailed report for a specific campaign", inputSchema: { type: "object", properties: { campaign_id: { type: "string", description: "The campaign ID", }, }, required: ["campaign_id"], }, }, // Account Information { name: "get_account", description: "Get account information", inputSchema: { type: "object", properties: {}, required: [], }, }, // Folder Management { name: "list_folders", description: "List all campaign folders", inputSchema: { type: "object", properties: {}, required: [], }, }, { name: "get_folder", description: "Get details of a specific folder", inputSchema: { type: "object", properties: { folder_id: { type: "string", description: "The folder ID", }, }, required: ["folder_id"], }, }, // Merge Fields { name: "list_merge_fields", description: "List all merge fields in a specific list", inputSchema: { type: "object", properties: { list_id: { type: "string", description: "The list ID", }, }, required: ["list_id"], }, }, { name: "get_merge_field", description: "Get details of a specific merge field", inputSchema: { type: "object", properties: { list_id: { type: "string", description: "The list ID", }, merge_field_id: { type: "number", description: "The merge field ID", }, }, required: ["list_id", "merge_field_id"], }, }, // File Manager { name: "list_files", description: "List all files in the File Manager", inputSchema: { type: "object", properties: {}, required: [], }, }, { name: "get_file", description: "Get details of a specific file", inputSchema: { type: "object", properties: { file_id: { type: "string", description: "The file ID", }, }, required: ["file_id"], }, }, // Landing Pages { name: "list_landing_pages", description: "List all landing pages", inputSchema: { type: "object", properties: {}, required: [], }, }, { name: "get_landing_page", description: "Get details of a specific landing page", inputSchema: { type: "object", properties: { page_id: { type: "string", description: "The landing page ID", }, }, required: ["page_id"], }, }, // E-commerce Stores { name: "list_stores", description: "List all e-commerce stores", inputSchema: { type: "object", properties: {}, required: [], }, }, { name: "get_store", description: "Get details of a specific store", inputSchema: { type: "object", properties: { store_id: { type: "string", description: "The store ID", }, }, required: ["store_id"], }, }, // E-commerce Products { name: "list_products", description: "List all products in a store", inputSchema: { type: "object", properties: { store_id: { type: "string", description: "The store ID", }, }, required: ["store_id"], }, }, { name: "get_product", description: "Get details of a specific product", inputSchema: { type: "object", properties: { store_id: { type: "string", description: "The store ID", }, product_id: { type: "string", description: "The product ID", }, }, required: ["store_id", "product_id"], }, }, // E-commerce Orders { 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"], }, }, { name: "get_order", description: "Get details of a specific order", inputSchema: { type: "object", properties: { store_id: { type: "string", description: "The store ID", }, order_id: { type: "string", description: "The order ID", }, }, required: ["store_id", "order_id"], }, }, // Conversations { name: "list_conversations", description: "List all conversations", inputSchema: { type: "object", properties: {}, required: [], }, }, { name: "get_conversation", description: "Get details of a specific conversation", inputSchema: { type: "object", properties: { conversation_id: { type: "string", description: "The conversation ID", }, }, required: ["conversation_id"], }, }, ];
- src/services/mailchimp.ts:319-326 (helper)Helper method in MailchimpService that performs the API request to retrieve product details from the Mailchimp e-commerce endpoint.async getProduct( storeId: string, productId: string ): Promise<MailchimpProduct> { return await this.makeRequest( `/ecommerce/stores/${storeId}/products/${productId}` ); }