get_order
Retrieve specific order details from Mailchimp stores using store and order IDs to access comprehensive purchase information for email marketing analysis.
Instructions
Get details of a specific order
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| store_id | Yes | The store ID | |
| order_id | Yes | The order ID |
Implementation Reference
- src/tools/index.ts:1123-1132 (handler)The handler logic for the 'get_order' tool within the handleToolCall switch statement. It invokes the Mailchimp service to fetch the order and returns it as a JSON-formatted text response.case "get_order": const order = await service.getOrder(args.store_id, args.order_id); return { content: [ { type: "text", text: JSON.stringify(order, null, 2), }, ], };
- src/tools/index.ts:498-515 (schema)The input schema and metadata definition for the 'get_order' tool, specifying required store_id and order_id parameters.{ 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"], }, },
- src/index.ts:42-46 (registration)MCP server registration for listing tools, which includes the 'get_order' tool via getToolDefinitions.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: getToolDefinitions(mailchimpService), }; });
- src/index.ts:52-59 (registration)MCP server registration for handling tool calls, dispatching to handleToolCall which processes 'get_order'.server.setRequestHandler(CallToolRequestSchema, async (request) => { try { return await handleToolCall( mailchimpService, request.params.name, request.params.arguments ); } catch (error: any) {
- src/services/mailchimp.ts:337-341 (helper)Helper method in MailchimpService that performs the API request to retrieve order details from Mailchimp's e-commerce endpoint.async getOrder(storeId: string, orderId: string): Promise<MailchimpOrder> { return await this.makeRequest( `/ecommerce/stores/${storeId}/orders/${orderId}` ); }