get-product-details
Retrieve detailed specifications and information for any Lulu product by providing its unique product ID, enabling accurate product management and integration.
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:63-89 (handler)The async handler function that implements the get-product-details tool logic, currently returning mock product data.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 using Zod validation.{ product_id: z.string().describe("Lulu product ID") },
- src/server.ts:57-90 (registration)Registers the get-product-details tool with the MCP server instance, including schema and inline handler.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 }; } } );