Skip to main content
Glama

woolworths_open_browser

Open a browser to access Woolworths Australia's online shopping platform, enabling product search, specials browsing, cart management, and product detail access through natural language interactions.

Instructions

Opens a browser and navigates to Woolworths website. This is the first step to establish a session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
headlessNoWhether to run browser in headless mode (default: false for easier login)

Implementation Reference

  • The main handler function for 'woolworths_open_browser' tool. Launches Puppeteer browser in specified mode, creates a new page, sets user agent, navigates to Woolworths homepage, and returns success status.
    async function handleOpenBrowser(args: any): Promise<any> {
      if (browser) {
        return {
          success: false,
          message: "Browser is already open. Close it first with woolworths_close_browser.",
        };
      }
    
      const headless = args.headless ?? false;
    
      browser = await puppeteer.launch({
        headless,
        args: [
          "--no-sandbox",
          "--disable-setuid-sandbox",
          "--disable-blink-features=AutomationControlled",
        ],
        defaultViewport: { width: 1280, height: 800 },
      });
    
      currentPage = await browser.newPage();
    
      // Set user agent to appear more like a real browser
      await currentPage.setUserAgent(
        "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
      );
    
      // Navigate to Woolworths homepage
      await currentPage.goto("https://www.woolworths.com.au", {
        waitUntil: "networkidle2",
      });
    
      return {
        success: true,
        message:
          "Browser opened and navigated to Woolworths homepage. You can now log in manually if needed, then use woolworths_get_cookies to capture the session.",
        url: currentPage.url(),
      };
    }
  • The schema definition for the 'woolworths_open_browser' tool, including name, description, and input schema for headless mode.
    {
      name: "woolworths_open_browser",
      description:
        "Opens a browser and navigates to Woolworths website. This is the first step to establish a session.",
      inputSchema: {
        type: "object",
        properties: {
          headless: {
            type: "boolean",
            description: "Whether to run browser in headless mode (default: false for easier login)",
            default: false,
          },
        },
      },
    },
  • src/index.ts:623-625 (registration)
    The switch case registration that dispatches calls to the 'woolworths_open_browser' handler function within the MCP CallToolRequest handler.
    case "woolworths_open_browser":
      result = await handleOpenBrowser(args || {});
      break;
  • src/index.ts:19-34 (registration)
    The tool is registered in the TOOLS array used by ListToolsRequestSchema to list available tools.
    const TOOLS: Tool[] = [
      {
        name: "woolworths_open_browser",
        description:
          "Opens a browser and navigates to Woolworths website. This is the first step to establish a session.",
        inputSchema: {
          type: "object",
          properties: {
            headless: {
              type: "boolean",
              description: "Whether to run browser in headless mode (default: false for easier login)",
              default: false,
            },
          },
        },
      },
Behavior3/5

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

No annotations are provided, so the description carries full burden. It mentions establishing a session, which implies this tool may create browser state or cookies needed for subsequent operations. However, it doesn't disclose behavioral traits like whether it requires authentication, potential side effects (e.g., opening visible browser windows), or error handling. The description adds some context but lacks depth for a tool with session implications.

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?

Two sentences that are front-loaded with the core action and followed by usage context. Every word earns its place: the first sentence states what it does, the second explains why/when to use it. No redundancy or fluff.

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

Completeness4/5

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

Given the tool's low complexity (1 optional parameter, no output schema, no annotations), the description is reasonably complete. It covers purpose and usage guidelines well. However, for a session-establishing tool, it could benefit from more behavioral details (e.g., what 'establish a session' entails, error cases). The absence of output schema isn't critical here as the action is straightforward.

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

Parameters4/5

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

Schema description coverage is 100%, so the schema fully documents the single parameter 'headless'. The description doesn't add any parameter-specific information beyond what's in the schema, but with 0 required parameters and high schema coverage, the baseline is 3. It gets a 4 because the description implicitly supports the parameter's purpose by mentioning 'easier login' in the context of session establishment, though this is not explicit in the description text itself.

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

Purpose5/5

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

The description clearly states the specific action ('Opens a browser and navigates to Woolworths website') and distinguishes it from siblings by emphasizing it's 'the first step to establish a session', unlike tools like woolworths_navigate which presumably navigates within an existing session. It uses precise verbs and identifies the target resource.

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

Usage Guidelines5/5

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

Explicitly states when to use this tool: 'This is the first step to establish a session.' This provides clear context for usage relative to other tools like woolworths_close_browser (for ending sessions) or woolworths_navigate (for subsequent navigation). It effectively guides the agent on sequencing.

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