Skip to main content
Glama

check_in

Complete online check-in for Delta flights using confirmation number and passenger last name. Returns boarding pass information after successful check-in, which opens 24 hours before departure.

Instructions

Complete online check-in for an upcoming Delta flight. Check-in opens 24 hours before departure. Returns boarding pass info on success.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmationNumberYesDelta booking confirmation number
lastNameYesPassenger last name (as it appears on the ticket)

Implementation Reference

  • The main checkIn function that executes the tool logic - navigates to Delta's check-in page, fills in confirmation number and last name, submits the form, and returns the check-in result.
    export async function checkIn(params: {
      confirmationNumber: string;
      lastName: string;
    }): Promise<CheckInResult> {
      const { page } = await initBrowser();
    
      await page.goto(`${DELTA_BASE_URL}/us/en/check-in/overview`, {
        waitUntil: "domcontentloaded",
        timeout: DEFAULT_TIMEOUT,
      });
      await randomDelay(1500, 3000);
    
      try {
        // Fill in confirmation number
        await page.fill(
          'input[name*="confirmation"], input[id*="confirmation"], [data-testid*="confirmation"]',
          params.confirmationNumber,
          { timeout: 10000 }
        );
        await randomDelay(300, 600);
    
        // Fill in last name
        await page.fill(
          'input[name*="lastName"], input[name*="last-name"], input[id*="lastName"], [data-testid*="last-name"]',
          params.lastName,
          { timeout: 5000 }
        );
        await randomDelay(300, 600);
    
        // Submit
        await page.click(
          'button:has-text("Check In"), button[type="submit"], [data-testid*="check-in-btn"]',
          { timeout: 5000 }
        );
        await randomDelay(3000, 6000);
    
        // Check for success
        const success = await page.evaluate(() => {
          const body = document.body.innerText;
          return (
            body.includes("Check-in Complete") ||
            body.includes("Boarding Pass") ||
            body.includes("You're checked in")
          );
        });
    
        if (success) {
          return {
            success: true,
            message: "Check-in successful! Use get_boarding_pass to retrieve your boarding pass.",
            confirmationNumber: params.confirmationNumber,
          };
        }
    
        const errorMsg = await page.evaluate(() => {
          const errorEl = document.querySelector(
            '[class*="error"], [role="alert"], [class*="alert"]'
          );
          return errorEl?.textContent?.trim();
        });
    
        return {
          success: false,
          message: errorMsg || "Check-in could not be completed. Please try again or check in at the airport.",
        };
      } catch (error) {
        const msg = error instanceof Error ? error.message : String(error);
        return {
          success: false,
          message: `Check-in failed: ${msg}. Please try check-in at delta.com or at the airport kiosk.`,
        };
      }
    }
  • CheckInResult interface defining the output schema for the check_in tool with success status, message, boarding passes, and confirmation number.
    export interface CheckInResult {
      success: boolean;
      message: string;
      boardingPasses?: BoardingPass[];
      confirmationNumber?: string;
    }
  • src/index.ts:279-296 (registration)
    Tool registration defining 'check_in' with its name, description, and inputSchema specifying confirmationNumber and lastName as required parameters.
    {
      name: "check_in",
      description:
        "Complete online check-in for an upcoming Delta flight. Check-in opens 24 hours before departure. Returns boarding pass info on success.",
      inputSchema: {
        type: "object",
        properties: {
          confirmationNumber: {
            type: "string",
            description: "Delta booking confirmation number",
          },
          lastName: {
            type: "string",
            description: "Passenger last name (as it appears on the ticket)",
          },
        },
        required: ["confirmationNumber", "lastName"],
      },
  • Case handler for 'check_in' tool that extracts confirmationNumber and lastName from args, calls the checkIn function from browser.ts, and returns formatted JSON response.
    case "check_in": {
      const { confirmationNumber, lastName } = args as {
        confirmationNumber: string;
        lastName: string;
      };
    
      const result = await checkIn({ confirmationNumber, lastName });
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              {
                success: result.success,
                message: result.message,
                boardingPasses: result.boardingPasses,
                note: result.success
                  ? "Check-in complete. Use get_boarding_pass to retrieve your digital boarding pass."
                  : undefined,
              },
              null,
              2
            ),
          },
        ],
      };
    }

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

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