get-product-details
Retrieve specifications and details for Lulu print products using product IDs to access accurate information for print-on-demand services.
Instructions
Get specifications and details for a Lulu product
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| product_id | Yes | Lulu product ID |
Implementation Reference
- src/server.ts:57-90 (registration)Registration of the 'get-product-details' MCP tool, including description, input schema, and handler function.server.tool( "get-product-details", "Get specifications and details for a Lulu product", { product_id: z.string().describe("Lulu product ID") }, async ({ product_id }) => { try { // TODO: Implement actual API call const mockProduct = { product_id, name: "Sample Product", type: "Paperback", dimensions: "6x9 inches", message: "This is mock data - actual API integration pending" }; return { content: [{ type: "text" as const, text: JSON.stringify(mockProduct, null, 2) }] }; } catch (error: any) { return { content: [{ type: "text" as const, text: `Error: ${error.message}` }], isError: true }; } } );
- src/server.ts:63-89 (handler)Handler function for 'get-product-details' tool that returns mock product details based on product_id, with error handling.async ({ product_id }) => { try { // TODO: Implement actual API call const mockProduct = { product_id, name: "Sample Product", type: "Paperback", dimensions: "6x9 inches", message: "This is mock data - actual API integration pending" }; return { content: [{ type: "text" as const, text: JSON.stringify(mockProduct, null, 2) }] }; } catch (error: any) { return { content: [{ type: "text" as const, text: `Error: ${error.message}` }], isError: true }; } }
- src/server.ts:60-62 (schema)Input schema for the 'get-product-details' tool, defining product_id as a required string using Zod.{ product_id: z.string().describe("Lulu product ID") },