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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "origin": "<origin>",
      "destination": "<destination>",
      "departure_date": "<departure_date>"
    },
    "name": "search_flights"
  }
}

Input 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_mixed_carriersNoAllow multiple reported marketing carriers within a direction. This does not describe ticketing or connection protection.

Output 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. Changed4 schema fields changed
    • addedInput schema / properties / allow_mixed_carriers
      Added value: +{
      +  "default": true,
      +  "description": "Allow multiple reported marketing carriers within a direction. This does not describe ticketing or connection protection.",
      +  "title": "Allow Mixed Carriers",
      +  "type": "boolean"
      +}
    • removedInput schema / properties / allow_self_transfer
      Removed value: -{
      -  "default": true,
      -  "description": "Whether to include self-transfer flight options (true or false).",
      -  "title": "Allow Self Transfer",
      -  "type": "boolean"
      -}
    • addedOutput schema / properties / itineraries / items / properties / has_mixed_carriers
      Added value: +{
      +  "description": "True when a direction contains multiple reported marketing carriers. This does not describe ticketing or connection protection.",
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
    • removedOutput schema / properties / itineraries / items / properties / requires_self_transfer
      Removed value: -{
      -  "description": "Indicates if itinerary includes self-transfer.",
      -  "type": [
      -    "boolean",
      -    "null"
      -  ]
      -}
  2. 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"
      +        ]
      +      }
      +    }
      +  }
      +}
  3. 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."
  4. 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"
      +]
  5. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, non-destructive, openWorld), so the description's value is in explaining result semantics: booking_options are grouped, one link per group, and separate bookings are required across groups, with booking_url only when a single booking covers the itinerary. That is genuinely useful context an agent could not infer from the annotations. It does not mention rate limits or throttling, which would push it to a 5.

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 short sentences, front-loaded with the core action, then result-shape guidance. No filler, though "Returns complete booking_options with leg coverage and prices when known" is dense jargon that could be plainer.

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?

With 16 parameters, 100% schema coverage, annotations, and an output schema, the description covers what's missing from structured data: the booking-group result model and the single-booking condition. It could still say more about market/currency effects on pricing, but nothing critical is absent.

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 explains all 16 parameters including market, max_stops, and passenger counts. The description only restates the IATA-code requirement and the one-way/round-trip distinction, adding little beyond the structured fields.

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?

States a specific verb and resource ("Search ... flight prices") along with the scope (one-way or round-trip, between two IATA airport codes). An agent can immediately tell this is the fare-search tool rather than an airport lookup or a flexible-date search.

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 implied by the round-trip vs one-way framing and the return_date semantics, but the description never contrasts itself with siblings search_cheapest_dates or search_airports. The "choose one link per group" instruction is post-result handling, not a when-to-call-this-vs-that rule.

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.