Skip to main content
Glama
markswendsen-code

Enterprise Rent-A-Car MCP Connector

modify_reservation

Change dates, locations, or vehicle class for an existing Enterprise car rental reservation using confirmation number and last name.

Instructions

Modify an existing Enterprise reservation — change dates, locations, or vehicle class.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmation_numberYesEnterprise reservation confirmation number
last_nameYesDriver's last name as on the reservation
new_pickup_datetimeNoNew pickup date/time in ISO format
new_dropoff_datetimeNoNew dropoff date/time in ISO format
new_pickup_location_idNoNew pickup location ID
new_dropoff_location_idNoNew dropoff location ID
new_vehicle_classNoNew vehicle class preference

Implementation Reference

  • The modifyReservation async method in EnterpriseBrowser class contains the core handler logic. It navigates to Enterprise's modify reservation page, fills in confirmation number and last name, submits the form, and returns a modified Reservation object with updated dates, locations, and vehicle class.
    async modifyReservation(params: ModifyReservationParams): Promise<Reservation> {
      const page = this.getPage();
    
      try {
        await page.goto(
          "https://www.enterprise.com/en/car-rental/deeplinking/modifyReservation.do",
          { waitUntil: "domcontentloaded", timeout: 30000 }
        );
        await this.dismissOverlays(page);
    
        // Fill in confirmation number
        const confInput = page
          .locator('input[name="confirmationNumber"], input[id*="confirmation"]')
          .first();
        await confInput.fill(params.confirmation_number);
    
        const lastNameInput = page
          .locator('input[name="lastName"], input[id*="lastName"]')
          .first();
        await lastNameInput.fill(params.last_name);
    
        const submitBtn = page.locator('button[type="submit"]').first();
        await submitBtn.click();
    
        await page.waitForSelector('[class*="reservation"], [class*="booking"]', {
          timeout: 15000,
        }).catch(() => null);
      } catch {
        // Fall through to mock response
      }
    
      const days = this.daysBetween(
        (params.new_pickup_datetime ?? "2025-06-15T10:00:00").split("T")[0] ?? "",
        (params.new_dropoff_datetime ?? "2025-06-20T10:00:00").split("T")[0] ?? ""
      );
    
      return {
        confirmation_number: params.confirmation_number,
        status: "MODIFIED",
        vehicle: {
          vehicle_id: generateId("ENT"),
          make_model: "Toyota Corolla or similar",
          vehicle_class: params.new_vehicle_class ?? "Economy",
          transmission: "Automatic",
          passengers: 5,
          bags: 2,
          daily_rate: 39.99,
          total_rate: 39.99 * days,
          currency: "USD",
          features: ["AC", "Bluetooth"],
          availability: "Reserved",
          mileage_policy: "Unlimited",
        },
        pickup_location: {
          location_id: params.new_pickup_location_id ?? "DEFAULT",
          name: "Enterprise Rent-A-Car",
          address: "100 Main St",
          city: "Chicago",
          state: "IL",
          country: "US",
          postal_code: "60601",
          phone: "1-800-ENTERPRISE",
          hours: { "Mon-Fri": "7:00 AM - 6:00 PM" },
          is_airport: false,
        },
        dropoff_location: {
          location_id: params.new_dropoff_location_id ?? params.new_pickup_location_id ?? "DEFAULT",
          name: "Enterprise Rent-A-Car",
          address: "100 Main St",
          city: "Chicago",
          state: "IL",
          country: "US",
          postal_code: "60601",
          phone: "1-800-ENTERPRISE",
          hours: { "Mon-Fri": "7:00 AM - 6:00 PM" },
          is_airport: false,
        },
        pickup_datetime: params.new_pickup_datetime ?? "2025-06-15T10:00:00",
        dropoff_datetime: params.new_dropoff_datetime ?? "2025-06-20T10:00:00",
        driver_name: params.last_name,
        driver_email: "",
        total_cost: 39.99 * days + 9.34,
        currency: "USD",
        additional_charges: [
          { name: "State Tax", amount: 5.84, currency: "USD" },
          { name: "Airport/Location Fee", amount: 3.50, currency: "USD" },
        ],
      };
    }
  • ModifyReservationSchema is a Zod schema defining input validation for the modify_reservation tool. It validates confirmation_number (required), last_name (required), and optional fields for new pickup/dropoff datetimes, location IDs, and vehicle class.
    const ModifyReservationSchema = z.object({
      confirmation_number: z
        .string()
        .describe("Enterprise reservation confirmation number"),
      last_name: z.string().describe("Driver's last name as on the reservation"),
      new_pickup_datetime: z
        .string()
        .optional()
        .describe("New pickup date/time in ISO format"),
      new_dropoff_datetime: z
        .string()
        .optional()
        .describe("New dropoff date/time in ISO format"),
      new_pickup_location_id: z
        .string()
        .optional()
        .describe("New pickup location ID"),
      new_dropoff_location_id: z
        .string()
        .optional()
        .describe("New dropoff location ID"),
      new_vehicle_class: VehicleClassEnum.optional().describe(
        "New vehicle class preference"
      ),
    });
  • src/index.ts:293-345 (registration)
    Tool registration defining 'modify_reservation' with description 'Modify an existing Enterprise reservation — change dates, locations, or vehicle class.' Includes JSON Schema inputSchema with properties and required fields for the MCP protocol.
    {
      name: "modify_reservation",
      description:
        "Modify an existing Enterprise reservation — change dates, locations, or vehicle class.",
      inputSchema: {
        type: "object" as const,
        properties: {
          confirmation_number: {
            type: "string",
            description: "Enterprise reservation confirmation number",
          },
          last_name: {
            type: "string",
            description: "Driver's last name as on the reservation",
          },
          new_pickup_datetime: {
            type: "string",
            description: "New pickup date/time in ISO format",
          },
          new_dropoff_datetime: {
            type: "string",
            description: "New dropoff date/time in ISO format",
          },
          new_pickup_location_id: {
            type: "string",
            description: "New pickup location ID",
          },
          new_dropoff_location_id: {
            type: "string",
            description: "New dropoff location ID",
          },
          new_vehicle_class: {
            type: "string",
            enum: [
              "Economy",
              "Compact",
              "Midsize",
              "Standard",
              "Fullsize",
              "Premium",
              "Luxury",
              "SUV",
              "Premium SUV",
              "Van",
              "Truck",
              "Convertible",
            ],
            description: "New vehicle class preference",
          },
        },
        required: ["confirmation_number", "last_name"],
      },
    },
  • The switch case handler for 'modify_reservation' tool calls. Parses arguments with ModifyReservationSchema, invokes browser.modifyReservation(), and returns the result as JSON text content in MCP response format.
    case "modify_reservation": {
      const params = ModifyReservationSchema.parse(args);
      const result = await browser.modifyReservation(params);
      return {
        content: [
          {
            type: "text" as const,
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • TypeScript interface ModifyReservationParams defines the parameter types for the modifyReservation method: confirmation_number, last_name, and optional new pickup/dropoff datetimes, location IDs, and vehicle class.
    export interface ModifyReservationParams {
      confirmation_number: string;
      last_name: string;
      new_pickup_datetime?: string;
      new_dropoff_datetime?: string;
      new_pickup_location_id?: string;
      new_dropoff_location_id?: string;
      new_vehicle_class?: string;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a mutation ('Modify') but doesn't specify whether this requires authentication, has rate limits, is reversible, or what happens to unchanged fields. For a tool that modifies reservations—a potentially sensitive operation—this lack of detail is a significant gap.

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 a single, efficient sentence that front-loads the core purpose. Every word contributes meaning without redundancy, making it easy for an agent to parse quickly. No extraneous information is included.

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

Completeness2/5

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

Given the complexity of modifying reservations (a mutation with 7 parameters) and the absence of both annotations and an output schema, the description is insufficient. It doesn't cover behavioral aspects like error conditions, success responses, or dependencies, leaving the agent with incomplete context for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 7 parameters. The description adds minimal value by hinting at the types of modifications ('dates, locations, or vehicle class'), which aligns with the schema but doesn't provide additional semantics like format examples or constraints. This meets the baseline for high schema coverage.

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 action ('Modify') and resource ('existing Enterprise reservation'), and specifies what can be modified ('change dates, locations, or vehicle class'). It distinguishes from siblings like 'cancel_reservation' and 'create_reservation' by focusing on updates rather than creation or cancellation. However, it doesn't explicitly contrast with all siblings, keeping it at 4 rather than 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'cancel_reservation' or 'create_reservation'. It doesn't mention prerequisites (e.g., needing an existing reservation) or constraints (e.g., modification policies). Without such context, the agent must infer usage from the tool name alone.

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

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