Skip to main content
Glama

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
NameRequiredDescriptionDefault
stockcodeYesThe product stockcode/ID

Implementation Reference

  • 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,
        };
      }
    }
  • 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;

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/elijah-g/Woolworths-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server