{
  "schema": "gofly-mcp-tools-v1",
  "version": "0.1.0",
  "endpoint": "https://mcp.gofly.travel/mcp",
  "transport": "streamable-http",
  "tools": [
    {
      "name": "get_travel_capabilities",
      "title": "Check what GoFly can do right now",
      "description": "Read whether GoFly is in test or live mode and which actions are enabled: booking, holds, exchanges, extras, cancellations, passenger updates and airline changes. Call this before promising the traveler an action.",
      "effect": "read",
      "twoStep": false,
      "view": null,
      "input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": false
      }
    },
    {
      "name": "get_account_status",
      "title": "Check traveler enrollment",
      "description": "Read whether the signed-in traveler has finished GoFly enrollment. Flight tools need the phase to be ready; any other phase must be completed in the GoFly app.",
      "effect": "read",
      "twoStep": false,
      "view": null,
      "input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": false
      }
    },
    {
      "name": "search_airports",
      "title": "Find airports",
      "description": "Find airports in GoFly's directory by city, airport name or code. Returns IATA codes for search_flights; whether flights exist is known only from a search.",
      "effect": "read",
      "twoStep": false,
      "view": null,
      "input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        },
        "required": [
          "query"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "search_flights",
      "title": "Search flights",
      "description": "Search live airline offers for a one-way, round-trip or multi-city journey. Returns the cheapest offers with price, times, stops, carriers and expiry. Offers expire; call get_flight_offer to revalidate one before booking. Searching never charges or reserves anything.",
      "effect": "read",
      "twoStep": false,
      "view": "flight-results",
      "input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "slices": {
            "minItems": 1,
            "maxItems": 6,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "origin": {
                  "type": "string",
                  "pattern": "^[A-Z]{3}$",
                  "description": "IATA airport code, for example ADD. Use search_airports when unsure."
                },
                "destination": {
                  "type": "string",
                  "pattern": "^[A-Z]{3}$",
                  "description": "IATA airport code, for example ADD. Use search_airports when unsure."
                },
                "departureDate": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                  "description": "Local departure date, YYYY-MM-DD"
                },
                "departureFrom": {
                  "description": "Earliest local departure, HH:MM; needs departureTo",
                  "type": "string",
                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
                },
                "departureTo": {
                  "description": "Latest local departure, HH:MM, after departureFrom",
                  "type": "string",
                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
                }
              },
              "required": [
                "origin",
                "destination",
                "departureDate"
              ],
              "additionalProperties": false
            },
            "description": "One slice is one-way. Two slices that reverse each other are a round trip. Anything else is multi-city. Dates must be in order and each slice must change airport."
          },
          "maxConnections": {
            "description": "Most connections on any flight; 0 means nonstop. Default 2.",
            "type": "integer",
            "minimum": 0,
            "maximum": 2
          },
          "adults": {
            "default": 1,
            "description": "At most 9 travelers in total",
            "type": "integer",
            "minimum": 1,
            "maximum": 9
          },
          "childAges": {
            "default": [],
            "description": "Age of each child on the travel date",
            "maxItems": 8,
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 2,
              "maximum": 17
            }
          },
          "lapInfantAges": {
            "default": [],
            "description": "Age of each infant on an adult lap; one adult per infant",
            "maxItems": 4,
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1
            }
          },
          "cabin": {
            "default": "economy",
            "type": "string",
            "enum": [
              "economy",
              "premium_economy",
              "business",
              "first"
            ]
          },
          "currency": {
            "default": "USD",
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "maxOffers": {
            "default": 10,
            "description": "How many of the cheapest offers to return",
            "type": "integer",
            "minimum": 1,
            "maximum": 50
          },
          "waitSeconds": {
            "default": 20,
            "description": "How long to wait for airlines to answer before returning partial results",
            "type": "integer",
            "minimum": 0,
            "maximum": 45
          }
        },
        "required": [
          "slices",
          "adults",
          "childAges",
          "lapInfantAges",
          "cabin",
          "currency",
          "maxOffers",
          "waitSeconds"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "get_flight_search",
      "title": "Refresh flight search",
      "description": "Read a flight search again by searchId while its status is starting, partial or polling: more offers may have arrived. Expired offers are dropped. Once the status is complete, expired or failed, start a new search instead.",
      "effect": "read",
      "twoStep": false,
      "view": "flight-results",
      "input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "searchId returned by search_flights"
          },
          "maxOffers": {
            "default": 10,
            "type": "integer",
            "minimum": 1,
            "maximum": 50
          }
        },
        "required": [
          "id",
          "maxOffers"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "get_flight_offer",
      "title": "Revalidate a flight offer",
      "description": "Revalidate one offer and read its current price, fare brand, change and refund rules, baggage allowance, hold option, document requirement and purchasable extras. Always call this before prepare_booking: the price can change.",
      "effect": "read",
      "twoStep": false,
      "view": "flight-results",
      "input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "searchId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "offerId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "searchId",
          "offerId"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "prepare_booking",
      "title": "Prepare a booking for review",
      "description": "Create a checkout for one offer with traveler details and chosen extras. This does not charge and does not book. It returns the checkout with its exact total, revision and expiry for the traveler to review. Passenger names must match travel documents. Each call without an idempotencyKey creates a new checkout.",
      "effect": "write",
      "twoStep": false,
      "view": "booking",
      "input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "searchId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "offerId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "bookingType": {
            "default": "instant",
            "type": "string",
            "enum": [
              "instant",
              "hold"
            ]
          },
          "passengers": {
            "minItems": 1,
            "maxItems": 9,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "givenName": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100,
                  "pattern": "^[^\\p{Cc}\\p{Cf}]+$"
                },
                "familyName": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100,
                  "pattern": "^[^\\p{Cc}\\p{Cf}]+$"
                },
                "bornOn": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "title": {
                  "type": "string",
                  "enum": [
                    "mr",
                    "ms",
                    "mrs",
                    "miss",
                    "dr"
                  ]
                },
                "gender": {
                  "type": "string",
                  "enum": [
                    "m",
                    "f"
                  ]
                },
                "email": {
                  "type": "string",
                  "maxLength": 254,
                  "format": "email",
                  "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                },
                "phoneNumber": {
                  "type": "string",
                  "pattern": "^\\+[1-9][0-9]{6,14}$"
                },
                "passport": {
                  "type": "object",
                  "properties": {
                    "uniqueIdentifier": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9]{1,30}$"
                    },
                    "issuingCountryCode": {
                      "type": "string",
                      "pattern": "^[A-Z]{2}$"
                    },
                    "expiresOn": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    }
                  },
                  "required": [
                    "uniqueIdentifier",
                    "issuingCountryCode",
                    "expiresOn"
                  ],
                  "additionalProperties": false
                },
                "loyaltyAccounts": {
                  "maxItems": 4,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "airlineCode": {
                        "type": "string",
                        "pattern": "^[A-Z0-9]{2,3}$"
                      },
                      "accountNumber": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9-]{1,40}$"
                      }
                    },
                    "required": [
                      "airlineCode",
                      "accountNumber"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "givenName",
                "familyName",
                "bornOn",
                "title",
                "gender",
                "email",
                "phoneNumber"
              ],
              "additionalProperties": false
            }
          },
          "services": {
            "default": [],
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "reference": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "quantity": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 9
                }
              },
              "required": [
                "reference",
                "quantity"
              ],
              "additionalProperties": false
            }
          },
          "idempotencyKey": {
            "description": "Idempotency key. Omit on the first call; a key is generated and returned. Reuse the returned key for every retry of the same request. Never invent a new key for the same purchase.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "searchId",
          "offerId",
          "bookingType",
          "passengers",
          "services"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "confirm_booking",
      "title": "Confirm and pay for a booking",
      "description": "Authorize payment and booking for a reviewed checkout, using its id, revision, exact total and the terms digest from get_booking (terms.digest), which binds the itinerary, price, conditions and the GoFly terms version the traveler saw. If the outcome is ever unknown, do not retry: call get_booking. Two steps: the first call changes nothing and returns the exact terms for the traveler to approve; the action runs only after that approval.",
      "effect": "irreversible",
      "twoStep": true,
      "view": "booking",
      "input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "acceptedTotal": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]{0,13})(\\.[0-9]{1,6})?$"
              },
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "decimalDigits": {
                "type": "integer",
                "minimum": 0,
                "maximum": 6
              }
            },
            "required": [
              "amount",
              "currency",
              "decimalDigits"
            ],
            "additionalProperties": false
          },
          "acceptedTerms": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "idempotencyKey": {
            "description": "Idempotency key. Omit on the first call; a key is generated and returned. Reuse the returned key for every retry of the same request. Never invent a new key for the same purchase.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "confirmation": {
            "description": "Approval digest issued together with the terms. Omit it unless you were given one for exactly these arguments.",
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        },
        "required": [
          "id",
          "revision",
          "acceptedTotal",
          "acceptedTerms"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "list_bookings",
      "title": "List bookings",
      "description": "List the traveler's checkouts and reservations with status, total, payment and ticketing state.",
      "effect": "read",
      "twoStep": false,
      "view": null,
      "input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": false
      }
    },
    {
      "name": "get_booking",
      "title": "Read a booking",
      "description": "Read one booking: status, itinerary, payment, refund, reservation and ticketing state. This is the way to reconcile after an uncertain result.",
      "effect": "read",
      "twoStep": false,
      "view": "booking",
      "input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "get_tickets",
      "title": "Read issued tickets",
      "description": "Read e-ticket numbers and the ticketed itinerary for a paid, issued booking.",
      "effect": "read",
      "twoStep": false,
      "view": "booking",
      "input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "get_booking_options",
      "title": "See what can be changed on a booking",
      "description": "Read what the traveler can still do with a booking: cancel, exchange, pay a hold, buy extras or accept an airline schedule change, plus any operations already in progress.",
      "effect": "read",
      "twoStep": false,
      "view": null,
      "input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "request_booking_change",
      "title": "Request a booking change quote",
      "description": "Ask for a quote to cancel and refund, exchange to another date or cabin, pay a held reservation, add extras, update passenger contact details or accept an airline change. This only prepares a quote; nothing changes until confirm_booking_change.",
      "effect": "write",
      "twoStep": false,
      "view": null,
      "input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "intent": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "const": "cancel"
                  }
                },
                "required": [
                  "action"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "const": "hold_payment"
                  }
                },
                "required": [
                  "action"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "const": "ancillaries"
                  },
                  "services": {
                    "minItems": 1,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "reference": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "quantity": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9
                        }
                      },
                      "required": [
                        "reference",
                        "quantity"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "action",
                  "services"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "const": "exchange"
                  },
                  "sliceIndex": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 5
                  },
                  "departureDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "cabin": {
                    "type": "string",
                    "enum": [
                      "economy",
                      "premium_economy",
                      "business",
                      "first"
                    ]
                  }
                },
                "required": [
                  "action",
                  "sliceIndex",
                  "departureDate",
                  "cabin"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "const": "airline_change"
                  },
                  "changeReference": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "action",
                  "changeReference"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "const": "passenger_update"
                  },
                  "passengerIndex": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 8
                  },
                  "email": {
                    "type": "string",
                    "maxLength": 254,
                    "format": "email",
                    "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  "phoneNumber": {
                    "type": "string",
                    "pattern": "^\\+[1-9][0-9]{6,14}$"
                  }
                },
                "required": [
                  "action",
                  "passengerIndex"
                ],
                "additionalProperties": false
              }
            ]
          },
          "idempotencyKey": {
            "description": "Idempotency key. Omit on the first call; a key is generated and returned. Reuse the returned key for every retry of the same request. Never invent a new key for the same purchase.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "id",
          "intent"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "get_booking_change",
      "title": "Read a booking change",
      "description": "Read a change operation: its status, quote or options, charge, penalty, refund amount and refund destination.",
      "effect": "read",
      "twoStep": false,
      "view": null,
      "input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "select_booking_change_option",
      "title": "Choose an exchange option",
      "description": "Choose one unexpired exchange option so its quote can be reviewed. Does not charge.",
      "effect": "write",
      "twoStep": false,
      "view": null,
      "input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "option": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "idempotencyKey": {
            "description": "Idempotency key. Omit on the first call; a key is generated and returned. Reuse the returned key for every retry of the same request. Never invent a new key for the same purchase.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "id",
          "option",
          "revision"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "confirm_booking_change",
      "title": "Confirm a booking change",
      "description": "Authorize a reviewed change quote including charges, penalties and the refund destination. Two steps: the first call changes nothing and returns the exact terms for the traveler to approve; the action runs only after that approval.",
      "effect": "irreversible",
      "twoStep": true,
      "view": "booking",
      "input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "acceptedTotal": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]{0,13})(\\.[0-9]{1,6})?$"
              },
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "decimalDigits": {
                "type": "integer",
                "minimum": 0,
                "maximum": 6
              }
            },
            "required": [
              "amount",
              "currency",
              "decimalDigits"
            ],
            "additionalProperties": false
          },
          "idempotencyKey": {
            "description": "Idempotency key. Omit on the first call; a key is generated and returned. Reuse the returned key for every retry of the same request. Never invent a new key for the same purchase.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "confirmation": {
            "description": "Approval digest issued together with the terms. Omit it unless you were given one for exactly these arguments.",
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        },
        "required": [
          "id",
          "revision",
          "acceptedTotal"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "abandon_booking_change",
      "title": "Abandon a booking change",
      "description": "Drop an unconfirmed change request. Two steps: the first call changes nothing and returns the exact terms for the traveler to approve; the action runs only after that approval.",
      "effect": "irreversible",
      "twoStep": true,
      "view": "booking",
      "input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "idempotencyKey": {
            "description": "Idempotency key. Omit on the first call; a key is generated and returned. Reuse the returned key for every retry of the same request. Never invent a new key for the same purchase.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "confirmation": {
            "description": "Approval digest issued together with the terms. Omit it unless you were given one for exactly these arguments.",
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "list_support_cases",
      "title": "List support cases",
      "description": "List the traveler's GoFly support cases.",
      "effect": "read",
      "twoStep": false,
      "view": null,
      "input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": false
      }
    },
    {
      "name": "get_support_case",
      "title": "Read a support case",
      "description": "Read one support case and its messages between the traveler and GoFly operators.",
      "effect": "read",
      "twoStep": false,
      "view": null,
      "input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "open_support_case",
      "title": "Open a support case",
      "description": "Open a GoFly support case for a booking when something cannot be completed here: unsupported request, unknown outcome, payment discrepancy, refund failure or passenger update. Two steps: the first call changes nothing and returns the exact terms for the traveler to approve; the action runs only after that approval.",
      "effect": "write",
      "twoStep": true,
      "view": "booking",
      "input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "reason": {
            "type": "string",
            "enum": [
              "unsupported",
              "unknown_outcome",
              "payment_discrepancy",
              "refund_failure",
              "passenger_update"
            ]
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "idempotencyKey": {
            "description": "Idempotency key. Omit on the first call; a key is generated and returned. Reuse the returned key for every retry of the same request. Never invent a new key for the same purchase.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "confirmation": {
            "description": "Approval digest issued together with the terms. Omit it unless you were given one for exactly these arguments.",
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        },
        "required": [
          "id",
          "reason",
          "message"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "reply_support_case",
      "title": "Reply to a support case",
      "description": "Send the traveler's reply on an open support case. Two steps: the first call changes nothing and returns the exact terms for the traveler to approve; the action runs only after that approval.",
      "effect": "write",
      "twoStep": true,
      "view": "booking",
      "input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "idempotencyKey": {
            "description": "Idempotency key. Omit on the first call; a key is generated and returned. Reuse the returned key for every retry of the same request. Never invent a new key for the same purchase.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "confirmation": {
            "description": "Approval digest issued together with the terms. Omit it unless you were given one for exactly these arguments.",
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          }
        },
        "required": [
          "id",
          "message"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "list_notifications",
      "title": "List travel alerts",
      "description": "Read ticket, schedule change, hold deadline, refund and support alerts for the traveler.",
      "effect": "read",
      "twoStep": false,
      "view": null,
      "input": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "cursor": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,30}$"
          }
        },
        "additionalProperties": false
      }
    }
  ]
}
