Skip to main content
Glama

woolworths_get_cookies

Retrieve session cookies from your current browser session to maintain authentication with Woolworths Australia's online shopping platform after logging in.

Instructions

Retrieves session cookies from the current browser session. Run this after logging in or establishing a session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that checks if browser and page are open, retrieves all cookies from the current Puppeteer page using page.cookies(), stores them in the global sessionCookies array, and returns success message with anonymized cookie info.
    async function handleGetCookies(args: any): Promise<any> {
      if (!browser || !currentPage) {
        throw new Error("Browser is not open. Use woolworths_open_browser first.");
      }
    
      const cookies = await currentPage.cookies();
      sessionCookies = cookies;
    
      return {
        success: true,
        message: `Captured ${cookies.length} cookies from the current session.`,
        cookies: cookies.map((c) => ({
          name: c.name,
          domain: c.domain,
          path: c.path,
          secure: c.secure,
          httpOnly: c.httpOnly,
        })),
      };
    }
  • Tool schema definition with name, description, and empty input schema (no parameters required).
    {
      name: "woolworths_get_cookies",
      description:
        "Retrieves session cookies from the current browser session. Run this after logging in or establishing a session.",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • src/index.ts:631-633 (registration)
    Dispatches tool calls to the handleGetCookies handler function within the main CallToolRequestSchema switch statement.
    case "woolworths_get_cookies":
      result = await handleGetCookies(args || {});
      break;
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It mentions retrieving cookies from 'the current browser session,' implying it's read-only and session-dependent, which adds useful behavioral context. However, it lacks details on permissions, data format, or potential errors, leaving gaps for a tool that accesses sensitive session data.

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 two sentences, front-loaded with the core purpose and followed by usage timing. Every word earns its place with no redundancy or fluff, making it efficient and easy for an agent to parse quickly.

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

Completeness3/5

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

Given no annotations and no output schema, the description provides basic purpose and usage but lacks details on return values, error handling, or security implications. For a tool that retrieves session cookies—a sensitive operation—more context on output format or limitations would improve completeness, though the concise description is adequate for minimal functionality.

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?

There are 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description doesn't add param info, which is appropriate. A baseline of 4 is applied as per rules for zero parameters, since the tool's purpose is clear without parameter elaboration.

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 tool's purpose with 'Retrieves session cookies from the current browser session,' specifying both the action (retrieves) and resource (session cookies). It distinguishes from siblings by focusing on session data rather than browsing, cart operations, or product queries. However, it doesn't explicitly contrast with tools like woolworths_close_browser that might also involve session handling.

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

Usage Guidelines4/5

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

The description provides clear context for when to use it: 'Run this after logging in or establishing a session.' This gives practical timing guidance. It doesn't specify when not to use it or name alternatives, but the context implies it's for post-authentication scenarios, which is helpful for agent decision-making.

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