Skip to main content
Glama

add_early_bird

Add Early Bird Check-In to Southwest Airlines reservations for automatic check-in 36 hours before departure, improving boarding position.

Instructions

Add Early Bird Check-In to an existing reservation. Southwest automatically checks you in 36 hours before departure for a better boarding position (~$15-25 per person per flight).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmationNumberYesBooking confirmation number (6 characters)
firstNameYesPassenger first name
lastNameYesPassenger last name

Implementation Reference

  • The main handler function `addEarlyBird` that implements the tool logic. It navigates to Southwest's manage reservation page, fills in confirmation number and passenger name, checks if Early Bird is available or already added, and completes the purchase if possible.
    export async function addEarlyBird(input: AddEarlyBirdInput) {
      const page = await getPage();
      await ensureLoggedIn(page);
    
      // Navigate to manage reservation for Early Bird
      await page.goto(
        `https://www.southwest.com/air/manage-reservation/index.html`,
        { waitUntil: "networkidle" }
      );
    
      // Fill in the look-up form
      await page.fill(
        '[data-qa="confirmation-number"], [name="confirmationNumber"]',
        input.confirmationNumber.toUpperCase()
      );
      await page.fill(
        '[data-qa="first-name"], [name="firstName"]',
        input.firstName
      );
      await page.fill(
        '[data-qa="last-name"], [name="lastName"]',
        input.lastName
      );
    
      await page.click(
        '[data-qa="search-button"], [data-qa="retrieve-button"]'
      );
      await page.waitForNavigation({ waitUntil: "networkidle" }).catch(() => {});
    
      // Look for Early Bird option
      const earlyBirdButton = page.locator(
        '[data-qa="early-bird-add"], [data-qa*="early-bird"], .early-bird-btn'
      );
      const available = await earlyBirdButton.isVisible().catch(() => false);
    
      if (!available) {
        // Check if already added
        const alreadyAdded = await page
          .locator(
            '[data-qa="early-bird-added"], .early-bird-confirmed'
          )
          .isVisible()
          .catch(() => false);
    
        if (alreadyAdded) {
          return {
            success: false,
            message:
              "Early Bird Check-In is already added to this reservation.",
            alreadyAdded: true,
          };
        }
    
        return {
          success: false,
          message:
            "Early Bird Check-In is not available for this reservation. It may not be offered for this fare type or the flight is too close to departure.",
        };
      }
    
      // Get pricing before adding
      const price = await page
        .locator('[data-qa="early-bird-price"], .early-bird-price')
        .textContent()
        .catch(() => null);
    
      await earlyBirdButton.click();
      await page.waitForNavigation({ waitUntil: "networkidle" }).catch(() => {});
    
      // Complete purchase if required
      const purchaseButton = page.locator('[data-qa="purchase-button"], [data-qa="confirm-early-bird"]');
      if (await purchaseButton.isVisible().catch(() => false)) {
        await purchaseButton.click();
        await page.waitForNavigation({ waitUntil: "networkidle" }).catch(() => {});
      }
    
      const confirmed = await page
        .locator('[data-qa="early-bird-confirmed"], .confirmation-message')
        .isVisible()
        .catch(() => false);
    
      return {
        success: confirmed,
        confirmationNumber: input.confirmationNumber.toUpperCase(),
        passengerName: `${input.firstName} ${input.lastName}`,
        price: price || "See receipt",
        message: confirmed
          ? "Early Bird Check-In added successfully. You'll automatically be checked in 36 hours before departure."
          : "Early Bird Check-In may have been added — please verify your reservation.",
        note: "Early Bird Check-In automatically checks you in 36 hours before departure, giving you a better boarding position.",
      };
    }
  • Zod schema `addEarlyBirdSchema` defining input validation with confirmationNumber (6-char string), firstName, and lastName fields, plus the TypeScript type `AddEarlyBirdInput` derived from the schema.
    export const addEarlyBirdSchema = z.object({
      confirmationNumber: z
        .string()
        .describe("Booking confirmation number (6 characters)"),
      firstName: z.string().describe("Passenger first name"),
      lastName: z.string().describe("Passenger last name"),
    });
    
    export type AddEarlyBirdInput = z.infer<typeof addEarlyBirdSchema>;
  • src/index.ts:116-120 (registration)
    Tool registration in the TOOLS array defining the MCP tool with name "add_early_bird", a description explaining Early Bird Check-In functionality, and the inputSchema mapped from the Zod schema.
      name: "add_early_bird",
      description:
        "Add Early Bird Check-In to an existing reservation. Southwest automatically checks you in 36 hours before departure for a better boarding position (~$15-25 per person per flight).",
      inputSchema: zodToJsonSchema(addEarlyBirdSchema),
    },
  • src/index.ts:208-210 (registration)
    The switch case handler that routes "add_early_bird" tool calls to the `addEarlyBird` function, parsing arguments with the schema before execution.
    case "add_early_bird":
      result = await addEarlyBird(addEarlyBirdSchema.parse(args));
      break;
Behavior3/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 effectively communicates key behaviors: this is a paid service (~$15-25 per person per flight) that performs automated check-in 36 hours before departure. However, it doesn't mention potential limitations like availability constraints, refund policies, or error conditions, leaving some behavioral aspects unclear.

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 perfectly concise and front-loaded: the first sentence states the core purpose, and the second sentence adds crucial behavioral context (cost, timing, benefit). Every sentence earns its place with no wasted words, making it highly efficient for an AI agent.

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

Completeness4/5

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

For a tool with 3 parameters, 100% schema coverage, and no output schema, the description provides strong contextual completeness. It clearly explains what the tool does, its cost and timing, and distinguishes it from similar tools. The main gap is the lack of output information, but given the schema coverage and clear purpose, this is largely sufficient for 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 already fully documents all three parameters. The description doesn't add any parameter-specific information beyond what's in the schema descriptions. This meets the baseline of 3 when the schema does the heavy lifting, but no extra value is added.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Add Early Bird Check-In'), the target resource ('an existing reservation'), and the outcome ('automatically checks you in 36 hours before departure for a better boarding position'). It distinguishes this tool from siblings like 'check_in' by specifying this is a paid, automated service rather than manual check-in.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool: for existing reservations to secure better boarding positions via automated check-in. However, it doesn't explicitly state when NOT to use it (e.g., for new bookings, which would use 'book_with_points') or name specific alternatives among the siblings, though the context implies it's distinct from regular 'check_in'.

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

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