skip_week
Skip a HelloFresh delivery week to avoid receiving and being charged for that week's meal kit box. Specify the week identifier to modify your delivery schedule.
Instructions
Skip a delivery week so you won't receive or be charged for that week's box.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| week_id | Yes | The week identifier to skip (e.g. '2024-W01') |
Implementation Reference
- src/browser.ts:489-527 (handler)The skipWeek method is the core handler that implements the tool logic. It uses Playwright to navigate to the HelloFresh deliveries page, locate the specified week by data attribute, click the skip button, and confirm the skip action if prompted.
async skipWeek( weekId: string ): Promise<{ success: boolean; message: string }> { await this.ensureLoggedIn(); const page = this.page!; await page.goto(`${this.baseUrl}/my-account/deliveries`); await page.waitForLoadState("networkidle"); // Find the week and click skip const weekEl = page.locator( `[data-week="${weekId}"], [data-delivery-id="${weekId}"]` ); if (await weekEl.isVisible({ timeout: 5000 })) { const skipBtn = weekEl.locator( 'button:has-text("Skip"), [data-testid*="skip"]' ); if (await skipBtn.isVisible()) { await skipBtn.click(); await page.waitForLoadState("networkidle"); // Confirm skip if prompted const confirmBtn = page.locator( 'button:has-text("Confirm Skip"), button:has-text("Yes, Skip"), [data-testid*="confirm-skip"]' ); if (await confirmBtn.isVisible({ timeout: 3000 })) { await confirmBtn.click(); await page.waitForLoadState("networkidle"); } return { success: true, message: `Successfully skipped week ${weekId}` }; } } return { success: false, message: `Could not find or skip week ${weekId}. It may not be available for skipping.`, }; } - src/index.ts:51-53 (schema)SkipWeekSchema is a Zod schema that validates the input parameter 'week_id' as a required string, with a description indicating the expected format (e.g., '2024-W01').
const SkipWeekSchema = z.object({ week_id: z.string().describe("The week identifier to skip (e.g. '2024-W01')"), }); - src/index.ts:201-215 (registration)Tool registration for 'skip_week' that defines the MCP tool metadata including name, description, and inputSchema with a required week_id string property.
{ name: "skip_week", description: "Skip a delivery week so you won't receive or be charged for that week's box.", inputSchema: { type: "object", properties: { week_id: { type: "string", description: "The week identifier to skip (e.g. '2024-W01')", }, }, required: ["week_id"], }, }, - src/index.ts:456-460 (handler)The case handler for 'skip_week' that parses incoming arguments using SkipWeekSchema and invokes the hellofresh.skipWeek method with the validated week_id parameter.
case "skip_week": { const params = SkipWeekSchema.parse(args); const result = await this.hellofresh.skipWeek(params.week_id); return text(result); }