Skip to main content
Glama

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
NameRequiredDescriptionDefault
week_idYesThe week identifier to skip (e.g. '2024-W01')

Implementation Reference

  • 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.`,
      };
    }
  • 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"],
      },
    },
  • 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);
    }

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/markswendsen-code/mcp-hellofresh'

If you have feedback or need assistance with the MCP directory API, please join our Discord server