Skip to main content
Glama

woolworths_get_specials

Retrieve current special offers and deals from Woolworths Australia, with optional filtering by product category to find relevant discounts.

Instructions

Get current specials and deals from Woolworths

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNoOptional category filter (e.g., 'fruit-veg', 'meat-seafood')
pageSizeNoNumber of results to return (default: 20)

Implementation Reference

  • The main handler function that implements the logic for woolworths_get_specials tool, fetching specials from Woolworths API using session cookies.
    async function handleGetSpecials(args: any): Promise<any> {
      const category = args.category || "";
      const pageSize = args.pageSize ?? 20;
    
      let url = `https://www.woolworths.com.au/apis/ui/browse/category`;
    
      if (category) {
        url += `?category=${encodeURIComponent(category)}&filter=Specials&pageSize=${pageSize}`;
      } else {
        url += `?category=specials&pageSize=${pageSize}`;
      }
    
      try {
        const data = await makeWoolworthsRequest(url);
        return {
          success: true,
          category: category || "all",
          totalResults: data.TotalRecordCount || 0,
          products: data.Products || data.Bundles || [],
        };
      } catch (error: any) {
        return {
          success: false,
          error: error.message,
        };
      }
    }
  • Input schema definition for the woolworths_get_specials tool, including parameters for category and pageSize.
    {
      name: "woolworths_get_specials",
      description: "Get current specials and deals from Woolworths",
      inputSchema: {
        type: "object",
        properties: {
          category: {
            type: "string",
            description: "Optional category filter (e.g., 'fruit-veg', 'meat-seafood')",
          },
          pageSize: {
            type: "number",
            description: "Number of results to return (default: 20)",
            default: 20,
          },
        },
      },
    },
  • src/index.ts:647-649 (registration)
    Registration and dispatch of the woolworths_get_specials handler in the tool call switch statement.
    case "woolworths_get_specials":
      result = await handleGetSpecials(args || {});
      break;
  • src/index.ts:612-613 (registration)
    Registration of the tool list including woolworths_get_specials schema via the TOOLS array.
      tools: TOOLS,
    }));
  • Helper function used by the handler to make authenticated requests to Woolworths API with session cookies.
    async function makeWoolworthsRequest(
      url: string,
      options: any = {}
    ): Promise<any> {
      if (sessionCookies.length === 0) {
        throw new Error(
          "No session cookies available. Please use woolworths_get_cookies first."
        );
      }
    
      const headers = {
        "User-Agent":
          "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
        Accept: "*/*",
        "Accept-Language": "en-US,en;q=0.9",
        Origin: "https://www.woolworths.com.au",
        Referer: "https://www.woolworths.com.au/",
        "sec-fetch-dest": "empty",
        "sec-fetch-mode": "cors",
        "sec-fetch-site": "same-origin",
        Priority: "u=1, i",
        Cookie: getCookieHeader(),
        ...options.headers,
      };
    
      const response = await fetch(url, {
        ...options,
        headers,
      });
    
      if (!response.ok) {
        const errorText = await response.text();
        throw new Error(
          `API request failed: ${response.status} ${response.statusText}. ${errorText}`
        );
      }
    
      return response.json();
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't describe how it behaves—such as whether it requires authentication, has rate limits, returns real-time or cached data, or what format the results come in. This leaves significant gaps for an agent to understand the tool's operational characteristics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, direct sentence that efficiently conveys the core purpose without any unnecessary words. It's front-loaded with the essential information, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete for a tool that retrieves data. It doesn't explain what the return values look like (e.g., list of products with prices), potential limitations (e.g., pagination, availability), or how it integrates with other tools like cart operations. This leaves the agent with insufficient context to use the tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, clearly documenting both optional parameters ('category' and 'pageSize') with their purposes and defaults. The description adds no additional parameter information beyond what the schema provides, so it meets the baseline for adequate but not exceptional coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('current specials and deals from Woolworths'), making the purpose immediately understandable. However, it doesn't explicitly distinguish this tool from sibling tools like 'woolworths_search_products' or 'woolworths_get_categories', which could also retrieve product-related information.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention whether this is for browsing deals versus searching for specific products, nor does it reference sibling tools like 'woolworths_search_products' for more targeted queries.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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