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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:305-324 (handler)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, })), }; }
- src/index.ts:49-57 (schema)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;