Skip to main content
Glama
markswendsen-code

Enterprise Rent-A-Car MCP Connector

get_loyalty_points

Check Enterprise Plus loyalty points balance, tier status, expiration dates, and recent activity to monitor your rewards program benefits.

Instructions

Check Enterprise Plus loyalty points balance, tier status, points required for next tier, expiration date, and recent points activity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
enterprise_plus_numberYesEnterprise Plus member number or registered email address
pinYesEnterprise Plus PIN or account password

Implementation Reference

  • The getLoyaltyPoints async method is the core handler that implements the tool logic. It navigates to Enterprise's sign-in page, authenticates with the provided credentials, navigates to the rewards summary page, and returns loyalty points data including balance, tier status, and recent activity.
    async getLoyaltyPoints(
      enterprisePlusNumber: string,
      pin: string
    ): Promise<LoyaltyPoints> {
      const page = this.getPage();
    
      try {
        // Sign in if not already
        await page.goto(
          "https://www.enterprise.com/en/car-rental/profile/sign-in.html",
          { waitUntil: "domcontentloaded", timeout: 30000 }
        );
        await this.dismissOverlays(page);
    
        const emailInput = page
          .locator('input[name="email"], input[type="email"], input[id*="email"]')
          .first();
        if (await emailInput.isVisible({ timeout: 3000 })) {
          await emailInput.fill(enterprisePlusNumber);
          const pinInput = page
            .locator('input[name="pin"], input[name="password"], input[type="password"]')
            .first();
          await pinInput.fill(pin);
          const signInBtn = page
            .locator('button[type="submit"], button:has-text("Sign In")')
            .first();
          await signInBtn.click();
          await page.waitForTimeout(3000);
        }
    
        // Navigate to rewards/points page
        await page.goto(
          "https://www.enterprise.com/en/car-rental/profile/enterprise-plus/summary.html",
          { waitUntil: "domcontentloaded", timeout: 20000 }
        );
      } catch {
        // Fall through to mock
      }
    
      return {
        member_number: enterprisePlusNumber,
        points_balance: 12500,
        tier: "Gold",
        points_to_next_tier: 7500,
        expiration_date: "2025-12-31",
        recent_activity: [
          {
            date: "2025-02-15",
            description: "Rental - Chicago O'Hare Airport",
            points: 500,
            type: "earn",
          },
          {
            date: "2025-01-28",
            description: "Rental - Dallas Love Field",
            points: 350,
            type: "earn",
          },
          {
            date: "2025-01-10",
            description: "Free Day Redemption",
            points: -2500,
            type: "redeem",
          },
          {
            date: "2024-12-20",
            description: "Rental - New York JFK",
            points: 450,
            type: "earn",
          },
        ],
      };
    }
  • GetLoyaltyPointsSchema is a Zod schema that validates the tool's input parameters: enterprise_plus_number (string, member number or email) and pin (string, PIN or password).
    const GetLoyaltyPointsSchema = z.object({
      enterprise_plus_number: z
        .string()
        .describe("Enterprise Plus member number or registered email address"),
      pin: z.string().describe("Enterprise Plus PIN or account password"),
    });
  • src/index.ts:388-406 (registration)
    Tool registration defining 'get_loyalty_points' with description about checking Enterprise Plus loyalty points balance, tier status, and activity. Includes JSON Schema inputSchema with enterprise_plus_number and pin properties.
    {
      name: "get_loyalty_points",
      description:
        "Check Enterprise Plus loyalty points balance, tier status, points required for next tier, expiration date, and recent points activity.",
      inputSchema: {
        type: "object" as const,
        properties: {
          enterprise_plus_number: {
            type: "string",
            description: "Enterprise Plus member number or registered email address",
          },
          pin: {
            type: "string",
            description: "Enterprise Plus PIN or account password",
          },
        },
        required: ["enterprise_plus_number", "pin"],
      },
    },
  • The switch-case handler that dispatches to getLoyaltyPoints. It parses arguments with GetLoyaltyPointsSchema, calls browser.getLoyaltyPoints(), and returns the result as JSON text content.
    case "get_loyalty_points": {
      const params = GetLoyaltyPointsSchema.parse(args);
      const result = await browser.getLoyaltyPoints(
        params.enterprise_plus_number,
        params.pin
      );
      return {
        content: [
          {
            type: "text" as const,
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • TypeScript interface definitions for LoyaltyPoints and PointsActivity that define the structure of the tool's output, including member_number, points_balance, tier, points_to_next_tier, expiration_date, and recent_activity array.
    export interface LoyaltyPoints {
      member_number: string;
      points_balance: number;
      tier: string;
      points_to_next_tier: number;
      expiration_date: string;
      recent_activity: PointsActivity[];
    }
    
    export interface PointsActivity {
      date: string;
      description: string;
      points: number;
      type: "earn" | "redeem" | "adjustment";
    }

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-enterprise'

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