# Gordian Software MCP

> Gordian Software provides a way to search for, add, and purchase flight extras like seats, baggage allowances, and lounge access. It handles the whole lifecycle, letting your AI client manage everything from initializing a new trip record to checking refund eligibility and finally completing payment.

## Overview
- **Category:** payment-processing
- **Price:** Free
- **Tags:** airline-ancillaries, flight-booking, travel-api, seat-selection, baggage-booking

## Description

This MCP connects your agent directly to Gordian Software's API, giving it the capability to handle complex airline ancillary bookings using natural language. You can start by creating a new trip record for a passenger or running an initial search across various airlines just by asking. Once you find what you need—say, three extra bags and an aisle seat—the agent adds those products to a basket and validates them before purchase. If the booking changes or gets canceled, your AI client can handle updates or check refund status automatically. It makes dealing with multiple airline systems simple. When using Vinkius, all these complex payment and travel tools are available from one connection point, meaning you don't need to piece together separate connectors for every single step.

## Tools

### add_to_basket
Adds specific products like seats or bags to the current trip's shopping basket for later purchase.

### cancel_trip
Executes a full cancellation of an existing travel itinerary record with Gordian Software.

### check_basket
Validates all items currently held in the shopping basket to ensure they are still purchasable and valid.

### check_cancellation
Checks if any specific item or booking component is eligible for a refund based on its rules.

### create_trip
Initializes a new travel itinerary record, optionally starting an ancillary search right away.

### fulfill_trip
Processes the payment for all valid items in the basket using specified settlement or cash methods.

### get_basket
Retrieves a list of all products currently held in the trip's shopping basket.

### get_refund
Fetches detailed information regarding any potential refunds associated with a specific trip.

### get_search_results_by_product
Filters search results to show only specific types of products, like seats or bags.

### get_search_results
Retrieves comprehensive search results, including itineraries and available products, using a unique search ID.

### get_trip
Pulls the current and complete status details for a given trip record.

### inform_cancelled
Notifies Gordian Software that an external flight scheduled for this booking has been canceled.

### inform_changed
Alerts Gordian Software about any changes made to the original flight schedule or route.

### request_refund
Formalizes a request for an airline refund against a specific ticket booking.

### start_search
Begins an asynchronous search process for specific product types, like seats or baggage.

### subscribe_callback
Sets up a callback connection to receive automatic event notifications from Gordian Software.

### update_trip
Modifies existing trip details, such as adding a PNR/Record Locator after the flight segment is booked.

## Prompt Examples

**Prompt:** 
```
Create a new trip for a passenger in the US using USD and English.
```

**Response:** 
```
I've initialized a new trip. The Trip ID is `trip_8821`. You can now proceed to search for ancillaries or add ticket information.
```

**Prompt:** 
```
Search for available seats and bags for trip_8821.
```

**Response:** 
```
I've started the search for seats and bags. The Search ID is `srch_4432`. I will now poll for the results to show you the available options.
```

**Prompt:** 
```
Add product_id 'seat_123' to the basket for trip_8821.
```

**Response:** 
```
The seat has been added to your basket for trip_8821. The basket is currently valid. Would you like to fulfill the purchase now?
```

## Capabilities

### Search for flight extras
Initiate searches across multiple airlines to find specific products like seats, bags, or lounge passes.

### Build and modify trip records
Create new travel itineraries, add passenger details, update PNR numbers, and build a selection of items into a purchase basket.

### Finalize bookings and payments
Process the payment for all selected products using defined settlement methods, completing the actual ancillary purchases.

### Check current booking status
Retrieve real-time details on an existing trip, including what's booked and any necessary next steps.

### Manage refunds and cancellations
Determine if items are refundable or process a refund request following a cancellation.

### React to flight changes
Notify the system when an external flight status changes, either canceling or modifying the original itinerary.

## Use Cases

### Client needs a last-minute seat assignment
A support agent gets a call: 'I need an aisle seat for tomorrow.' The agent uses their AI client to `start_search` for seats, then calls `get_search_results_by_product` to narrow it down. Finally, the agent confirms availability and adds the selection using `add_to_basket`.

### Processing a group cancellation
A corporate booking team needs to cancel 20 tickets because of a venue change. They use their client to first run `get_trip` for all bookings, then systematically call `check_cancellation` on each one before finally executing the mass cancellation with `cancel_trip`.

### Handling post-flight itinerary updates
The developer needs to update a trip record after the flight segment is booked, adding the PNR. They use `update_trip`, which ensures all associated passenger details are correct and ready for billing.

### Determining refund eligibility on an old booking
A customer calls about a canceled trip from six months ago. Instead of calling multiple departments, the agent uses `get_refund` or `check_cancellation` to instantly give the client a firm answer.

## Benefits

- You can start a new booking and immediately run a search for ancillaries using `create_trip`, which saves the first manual step of opening a separate search portal.
- Instead of making multiple calls, you handle the full purchasing workflow—from adding items with `add_to_basket` to paying via `fulfill_trip`—in one conversational flow.
- The agent doesn't just check status; it provides actionable data. Use `get_trip` and immediately know if a change requires calling `inform_changed`, so you never miss an update.
- Need to fix a booking? You can cancel the whole thing with `cancel_trip`, then use `check_cancellation` to instantly see what parts are refundable before talking to the client.
- It handles communication gaps. If the flight changes externally, you don't manually update anything; simply calling `inform_changed` updates the record automatically.

## How It Works

The bottom line is you use your AI client to speak to the MCP; the MCP translates that request into a sequence of API calls for booking extras.

1. Connect your AI client and input your Gordian API Key through Vinkius.
2. Use natural language to tell the agent what you need, such as 'Start a trip for New York' or 'Search for seats on this flight'.
3. The agent executes the necessary tools, confirming each step—like adding items via add_to_basket and finally completing purchases with fulfill_trip.

## Frequently Asked Questions

**How do I start an ancillary search using the `start_search` tool?**
You trigger a search by asking your agent to begin searching for specific items, like seats or bags. The API runs this asynchronously and provides a Search ID you use later with get_search_results.

**What's the difference between `get_basket` and `check_basket`?**
`get_basket` just shows you what items are currently in your cart. You must call `check_basket` to validate those specific items, ensuring they haven't sold out or changed price since you added them.

**Can I update a booking after the flight is already booked?**
Yes, you use the `update_trip` tool. This lets you add necessary details like a PNR/Record Locator to an existing trip record without having to create a whole new one.

**If I need to cancel a booking, what do I call first?**
It's best practice to check refund eligibility first. Use `check_cancellation` or `get_refund` before calling `cancel_trip`. This prevents surprises about who pays for the difference.

**How do I handle real-time status updates using the `subscribe_callback` tool?**
You must first subscribe to event callbacks using this tool. This sets up a persistent connection that allows your AI client to receive automatic, asynchronous notifications when trip or payment statuses change in Gordian's system.

**Before I use the `cancel_trip` tool, how can I verify if an item is refundable using `check_cancellation`?**
The `check_cancellation` tool confirms refundability before you proceed. It validates whether specific items in your basket qualify for a return, preventing failed cancellation attempts.

**After I use the search tools and add items, what tool should I call to confirm the current overall status of the trip? (get_trip)**
Use `get_trip` to retrieve the latest snapshot of the entire booking. This confirms all added details, payment methods, and current passenger records are correctly stored on the system.

**If I need an airline to issue a refund for a ticket, how do I start the process using `request_refund`?**
`request_refund` initiates the formal refund request with the airline. This tool starts the necessary workflow, which is separate from simply viewing past refund details via `get_refund`.

**How do I check for available seats or bags for a specific trip?**
First, use the `start_search` tool with your `trip_id` and set `seat_search` or `bag_search` to true. Then, use the `get_search_results` tool with the returned `search_id` to see the available options once the search status is successful.

**Can I update a trip with a PNR after the flight is booked?**
Yes. Use the `update_trip` tool by providing the `trip_id` and a JSON object containing the new fields (like the record locator) to keep your Gordian trip state in sync with your airline booking.

**How do I finalize the purchase of items in the basket?**
Once you have added items using `add_to_basket`, use the `fulfill_trip` tool. You can specify the `payment_type` (e.g., 'gordian_settlement') to initiate the actual purchase process.