Skip to main content
Glama

Search flights

search_flights
Read-only

Search one-way or round-trip flight prices between two IATA airport codes. Returns complete booking_options with leg coverage and prices when known. Choose one link per group; multiple groups require separate bookings. booking_url is also included when one booking covers the whole itinerary.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
adultsNoNumber of adult passengers traveling.
marketNo2-letter market or country code affecting pricing and results.US
originYesOrigin airport or metro IATA code.
childrenNoNumber of child passengers traveling.
max_priceNoMaximum price in the selected market currency for flight results.
max_stopsNoMaximum number of stops allowed in the flight itinerary.
cabin_classNoPreferred cabin class: economy, premium_economy, business, or first.economy
destinationYesDestination airport or metro IATA code.
max_resultsNoMaximum number of flight results to return.
return_dateNoOptional return date in YYYY-MM-DD format for round-trip flights.
departure_dateYesDeparture date in YYYY-MM-DD format.
infants_on_lapNoNumber of infants traveling on an adult's lap.
infants_in_seatNoNumber of infants traveling with their own seat.
airlines_excludeNoAirline codes to specifically exclude from search results.
airlines_includeNoAirline codes to specifically include in search results.
allow_self_transferNoWhether to include self-transfer flight options (true or false).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
originYesOrigin airport details for flight search.
destinationYesDestination airport details for flight search.
itinerariesYesList of flight itineraries.
return_dateNoScheduled return date for round-trip flights (YYYY-MM-DD).
departure_dateYesScheduled departure date (YYYY-MM-DD).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • addedOutput schema / else
      Added value: +{
      +  "properties": {
      +    "itineraries": {
      +      "items": {
      +        "not": {
      +          "required": [
      +            "inbound"
      +          ]
      +        },
      +        "properties": {
      +          "booking_options": {
      +            "items": {
      +              "properties": {
      +                "legs": {
      +                  "const": [
      +                    "outbound"
      +                  ]
      +                }
      +              }
      +            },
      +            "maxItems": 1
      +          }
      +        }
      +      }
      +    }
      +  }
      +}
    • addedOutput schema / if
      Added value: +{
      +  "properties": {
      +    "return_date": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "return_date"
      +  ]
      +}
    • changedOutput schema / properties / itineraries / items / properties / booking_link / description
      Previous value: -"Clickable booking link for the itinerary."New value: +"Clickable link for the booking group's covered legs."
    • addedOutput schema / properties / itineraries / items / properties / booking_link / properties / price
      Added value: +{
      +  "description": "Price for this link's covered legs, when known.",
      +  "properties": {
      +    "amount": {
      +      "description": "Numerical price amount in given currency.",
      +      "type": "number"
      +    },
      +    "currency": {
      +      "description": "Currency code of the price amount.",
      +      "type": "string"
      +    },
      +    "status": {
      +      "description": "Whether the price was confirmed or is an unverified search hint.",
      +      "enum": [
      +        "verified",
      +        "unverified"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "amount",
      +    "currency",
      +    "status"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / properties / itineraries / items / properties / booking_link / properties / url / description
      Previous value: -"Direct URL to book the itinerary."New value: +"Direct URL to book the covered legs."
    • addedOutput schema / properties / itineraries / items / properties / booking_options
      Added value: +{
      +  "description": "Choose one link from every group. Multiple groups require separate bookings.",
      +  "items": {
      +    "properties": {
      +      "legs": {
      +        "items": {
      +          "enum": [
      +            "outbound",
      +            "inbound"
      +          ]
      +        },
      +        "type": "array"
      +      },
      +      "links": {
      +        "items": {
      +          "description": "Clickable link for the booking group's covered legs.",
      +          "properties": {
      +            "price": {
      +              "description": "Price for this link's covered legs, when known.",
      +              "properties": {
      +                "amount": {
      +                  "description": "Numerical price amount in given currency.",
      +                  "type": "number"
      +                },
      +                "currency": {
      +                  "description": "Currency code of the price amount.",
      +                  "type": "string"
      +                },
      +                "status": {
      +                  "description": "Whether the price was confirmed or is an unverified search hint.",
      +                  "enum": [
      +                    "verified",
      +                    "unverified"
      +                  ],
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "amount",
      +                "currency",
      +                "status"
      +              ],
      +              "type": "object"
      +            },
      +            "provider_name": {
      +              "description": "Name of booking provider.",
      +              "type": "string"
      +            },
      +            "provider_type": {
      +              "description": "Type of booking provider.",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "url": {
      +              "description": "Direct URL to book the covered legs.",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "provider_name",
      +            "url"
      +          ],
      +          "type": "object"
      +        },
      +        "minItems": 1,
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "legs",
      +      "links"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 2,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedOutput schema / properties / itineraries / items / properties / booking_url / description
      Previous value: -"Direct URL to book the itinerary."New value: +"Direct URL when one booking covers the whole itinerary."
    • changedOutput schema / properties / itineraries / items / required
      Previous value: -[
      -  "price",
      -  "outbound",
      -  "booking_url",
      -  "booking_link"
      -]New value: +[
      +  "price",
      +  "outbound",
      +  "booking_options"
      +]
    • addedOutput schema / then
      Added value: +{
      +  "properties": {
      +    "itineraries": {
      +      "items": {
      +        "properties": {
      +          "booking_options": {
      +            "oneOf": [
      +              {
      +                "maxItems": 1,
      +                "minItems": 1,
      +                "prefixItems": [
      +                  {
      +                    "properties": {
      +                      "legs": {
      +                        "const": [
      +                          "outbound",
      +                          "inbound"
      +                        ]
      +                      }
      +                    }
      +                  }
      +                ]
      +              },
      +              {
      +                "maxItems": 1,
      +                "minItems": 1,
      +                "prefixItems": [
      +                  {
      +                    "properties": {
      +                      "legs": {
      +                        "const": [
      +                          "inbound",
      +                          "outbound"
      +                        ]
      +                      }
      +                    }
      +                  }
      +                ]
      +              },
      +              {
      +                "maxItems": 2,
      +                "minItems": 2,
      +                "prefixItems": [
      +                  {
      +                    "properties": {
      +                      "legs": {
      +                        "const": [
      +                          "outbound"
      +                        ]
      +                      }
      +                    }
      +                  },
      +                  {
      +                    "properties": {
      +                      "legs": {
      +                        "const": [
      +                          "inbound"
      +                        ]
      +                      }
      +                    }
      +                  }
      +                ]
      +              },
      +              {
      +                "maxItems": 2,
      +                "minItems": 2,
      +                "prefixItems": [
      +                  {
      +                    "properties": {
      +                      "legs": {
      +                        "const": [
      +                          "inbound"
      +                        ]
      +                      }
      +                    }
      +                  },
      +                  {
      +                    "properties": {
      +                      "legs": {
      +                        "const": [
      +                          "outbound"
      +                        ]
      +                      }
      +                    }
      +                  }
      +                ]
      +              }
      +            ]
      +          }
      +        },
      +        "required": [
      +          "inbound"
      +        ]
      +      }
      +    }
      +  }
      +}
  2. Changed2 schema fields changed
    • changedInput schema / properties / destination / description
      Previous value: -"Destination airport code for flight search."New value: +"Destination airport or metro IATA code."
    • changedInput schema / properties / origin / description
      Previous value: -"Origin airport code for flight search."New value: +"Origin airport or metro IATA code."
  3. Changed2 schema fields changed
    • addedOutput schema / properties / itineraries / items / properties / price / properties / status
      Added value: +{
      +  "description": "Whether the price was confirmed or is an unverified search hint.",
      +  "enum": [
      +    "verified",
      +    "unverified"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / itineraries / items / properties / price / required
      Previous value: -[
      -  "amount",
      -  "currency"
      -]New value: +[
      +  "amount",
      +  "currency",
      +  "status"
      +]
  4. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered. The description adds genuinely non-structured behavior: results contain 'booking_options' grouped by bookable unit, prices appear only 'when known' (partial results are possible), and 'booking_url' is only present when a single booking covers the whole itinerary. These are the kind of quirks an agent would otherwise learn only by trial.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four sentences, front-loaded with the core purpose and result shape, no filler or hedging. The last two sentences on booking groups are slightly dense but each carries distinct information. Could be marginally tightened, hence not a 5.

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 16-parameter tool with full schema coverage and an output schema, the description is essentially complete: it covers trip type, result structure, and the booking-selection rule. Minor omissions (no mention of pricing currency source, rate limits, or that return_date is what makes the trip round-trip) keep it at a 4 rather than 5.

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 all 16 parameters are already documented in the schema, and an output schema exists. The description only echoes that origin/destination are IATA codes, adding no format, constraint, or interplay information beyond the schema (e.g. that return_date drives round-trip mode). Baseline 3 applies.

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 states a specific verb and resource ('Search ... flight prices') and scopes it to one-way or round-trip trips between two IATA codes. An agent immediately understands this is a fare-search tool. It does not name or contrast the siblings (search_airports, search_cheapest_dates), which keeps it short of a 5.

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

Usage Guidelines3/5

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

Usage is only implied: the description explains how to consume the output ('Choose one link per group; multiple groups require separate bookings') but gives no explicit when-to-use-vs-alternative guidance, e.g. when to prefer search_cheapest_dates for date flexibility or search_airports for code resolution. The booking-group instruction is useful operational context but is about interpreting results, not selecting this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.