woolworths_get_product_details
Retrieve detailed product information from Woolworths Australia using the product stockcode to access pricing, specifications, and availability data.
Instructions
Get detailed information about a specific product by its stockcode
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stockcode | Yes | The product stockcode/ID |
Implementation Reference
- src/index.ts:396-413 (handler)The handler function for woolworths_get_product_details. It takes a stockcode, constructs the Woolworths product detail API URL, fetches the data using makeWoolworthsRequest (which includes session cookies), and returns the product details or an error.async function handleGetProductDetails(args: any): Promise<any> { const stockcode = args.stockcode; const url = `https://www.woolworths.com.au/apis/ui/product/detail/${stockcode}`; try { const data = await makeWoolworthsRequest(url); return { success: true, product: data, }; } catch (error: any) { return { success: false, error: error.message, }; } }
- src/index.ts:102-116 (schema)The schema definition for the woolworths_get_product_details tool in the TOOLS array, specifying the input schema requiring a 'stockcode' string.{ name: "woolworths_get_product_details", description: "Get detailed information about a specific product by its stockcode", inputSchema: { type: "object", properties: { stockcode: { type: "string", description: "The product stockcode/ID", }, }, required: ["stockcode"], }, },
- src/index.ts:643-645 (registration)The switch case in the CallToolRequestSchema handler that registers and dispatches to the woolworths_get_product_details handler function.case "woolworths_get_product_details": result = await handleGetProductDetails(args || {}); break;