Skip to main content
Glama

search_flights

Read-onlyIdempotent

Searches flights between two airports (IATA codes such as JFK or LHR) on a departure date, with an optional return date, cabin class, travelers, maximum price and nonstop filter. Results come from our flight partner's airline inventory and include the airline, flight numbers, times, stops, duration, fare, baggage and refundability. Each result is ONE itinerary (the same flights at the same times) with its fare_options, cheapest first: each has its own offer_id, fare brand (e.g. Basic Economy, Main Cabin, Business), cabin, price_usd, rule (changes and refund in a few words), bags (the bags included with that fare, in words to repeat as given: a basic fare often has none, and not provided by the airline means unknown, not none), dot_24h_refund_eligible (true = the US DOT 24-hour rule covers that fare: the traveler can cancel within 24 hours of booking for a full refund; say so only when it is true), changeable/refundable and, when stated, change_penalty_usd and refund_penalty_usd (the AIRLINE's penalties: what the traveler loses to the airline on a change or a refund). Those are the airline's terms only: Autonomad's own change and cancellation fees come on top and are stated on the booking page and in create_booking_intent's flight_money_terms, so never call a fare free to change or free to cancel. When the cheapest fare is Basic Economy (is_basic_economy), say so plainly and repeat its terms exactly as returned (its rule, fare_note and fare_warning): Basic Economy fares differ by airline, so never describe one's changes or refunds in any other words. Offer the other fares and let the person choose. Searching does not reserve anything or charge anyone.

Travelers can be any age: only the account holder who books and pays must be 18 or older. For a party with children, send adults, children_ages (one age 0-17 per child who has their own seat, as of the last flight of the trip) and infants_on_lap (under-2s on an adult's lap, at most one per adult); at most 9 travelers in total. With any child or lap infant in the search, each offer's price_usd is the total for every traveler and there is no per-person price: quote the total, never divide it.

Input Schema

NameRequiredDescriptionDefault
placeNoThe exact place of this trip stop: the `place` an earlier search for the trip returned, or the candidate the person picked when a search asked which place they meant. Searches given the same place cover the same place. For flights it is the destination, flown by its main airport.
adultsNoAdults travelling (1-9). When given it is authoritative; children and lap infants are counted separately.
originYesIATA origin airport code (e.g., 'MIA', 'JFK', 'LAX')
passengersNoTotal travelers (1-9, default: 1). With adults/children_ages/infants_on_lap, this is worked out for you.
cabin_classNoCabin class (default: economy)
destinationYesWhere the person is flying to: a place name (e.g. 'Napa', 'Aspen', 'Bora Bora') or an IATA airport code in capitals (e.g. 'OAK'). A name is flown as that place: for a town, region or island the airports near it are compared (meta.arrival_airports, with the drive from each) and each offer says which one it lands at. A code is flown to that airport only.
return_dateNoReturn date for round-trip (YYYY-MM-DD). Omit for one-way.
nonstop_onlyNoOnly show nonstop flights (default: false)
origin_placeNoThe exact place the trip starts from, as an earlier search returned it (`origin_place`) or as the person picked it from a list of candidates.
children_agesNoOne age (0-17) per child with their OWN seat, as of the last flight of the trip.
max_price_usdNoMaximum total price in USD
departure_dateYesDeparture date (YYYY-MM-DD)
infants_on_lapNoUnder-2s travelling on an adult's lap (no seat). At most one per adult.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / passengers / description
      Previous value: -"Total travellers (1-9, default: 1). With adults/children_ages/infants_on_lap, this is worked out for you."New value: +"Total travelers (1-9, default: 1). With adults/children_ages/infants_on_lap, this is worked out for you."
  2. Changed11 schema fields changed
    • changedInput schema / properties / destination / description
      Previous value: -"IATA destination airport code"New value: +"Where the person is flying to: a place name (e.g. 'Napa', 'Aspen', 'Bora Bora') or an IATA airport code in capitals (e.g. 'OAK'). A name is flown as that place: for a town, region or island the airports near it are compared (meta.arrival_airports, with the drive from each) and each offer says which one it lands at. A code is flown to that airport only."
    • addedInput schema / properties / origin_place / properties / arrival_airports
      Added value: +{
      +  "description": "The airports to fly this place by, best first, as a search returned them. Pass them back unchanged.",
      +  "items": {
      +    "properties": {
      +      "iata": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "iata"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / origin_place / properties / extent_km
      Added value: +{
      +  "description": "The size of a region or island, as a search returned it.",
      +  "type": "number"
      +}
    • addedInput schema / properties / origin_place / properties / gateway_airport
      Added value: +{
      +  "description": "The one airport a wide search flies this place by, as a search returned it.",
      +  "type": "string"
      +}
    • addedInput schema / properties / origin_place / properties / kind
      Added value: +{
      +  "description": "What the place is, as a search returned it. Pass it back unchanged: a town, region or island has its hotels searched around it.",
      +  "enum": [
      +    "city",
      +    "town",
      +    "region",
      +    "island"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / origin_place / properties / radius_km
      Added value: +{
      +  "description": "The hotel search radius for this place, as a search returned it.",
      +  "type": "number"
      +}
    • addedInput schema / properties / place / properties / arrival_airports
      Added value: +{
      +  "description": "The airports to fly this place by, best first, as a search returned them. Pass them back unchanged.",
      +  "items": {
      +    "properties": {
      +      "iata": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "iata"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / place / properties / extent_km
      Added value: +{
      +  "description": "The size of a region or island, as a search returned it.",
      +  "type": "number"
      +}
    • addedInput schema / properties / place / properties / gateway_airport
      Added value: +{
      +  "description": "The one airport a wide search flies this place by, as a search returned it.",
      +  "type": "string"
      +}
    • addedInput schema / properties / place / properties / kind
      Added value: +{
      +  "description": "What the place is, as a search returned it. Pass it back unchanged: a town, region or island has its hotels searched around it.",
      +  "enum": [
      +    "city",
      +    "town",
      +    "region",
      +    "island"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / place / properties / radius_km
      Added value: +{
      +  "description": "The hotel search radius for this place, as a search returned it.",
      +  "type": "number"
      +}
  3. Changed2 schema fields changed
    • addedInput schema / properties / origin_place
      Added value: +{
      +  "description": "The exact place the trip starts from, as an earlier search returned it (`origin_place`) or as the person picked it from a list of candidates.",
      +  "properties": {
      +    "airports": {
      +      "description": "IATA codes of the airports serving the place.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "city": {
      +      "type": "string"
      +    },
      +    "country": {
      +      "description": "ISO 3166-1 alpha-2 code (territories use their own, e.g. PR).",
      +      "type": "string"
      +    },
      +    "label": {
      +      "description": "How to name the place to the person, e.g. 'Birmingham, GB'.",
      +      "type": "string"
      +    },
      +    "latitude": {
      +      "type": "number"
      +    },
      +    "longitude": {
      +      "type": "number"
      +    },
      +    "region": {
      +      "description": "State or region, or empty.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "country",
      +    "latitude",
      +    "longitude"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / place
      Added value: +{
      +  "description": "The exact place of this trip stop: the `place` an earlier search for the trip returned, or the candidate the person picked when a search asked which place they meant. Searches given the same place cover the same place. For flights it is the destination, flown by its main airport.",
      +  "properties": {
      +    "airports": {
      +      "description": "IATA codes of the airports serving the place.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "city": {
      +      "type": "string"
      +    },
      +    "country": {
      +      "description": "ISO 3166-1 alpha-2 code (territories use their own, e.g. PR).",
      +      "type": "string"
      +    },
      +    "label": {
      +      "description": "How to name the place to the person, e.g. 'Birmingham, GB'.",
      +      "type": "string"
      +    },
      +    "latitude": {
      +      "type": "number"
      +    },
      +    "longitude": {
      +      "type": "number"
      +    },
      +    "region": {
      +      "description": "State or region, or empty.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "country",
      +    "latitude",
      +    "longitude"
      +  ],
      +  "type": "object"
      +}
  4. Changed4 schema fields changed
    • addedInput schema / properties / adults
      Added value: +{
      +  "description": "Adults travelling (1-9). When given it is authoritative; children and lap infants are counted separately.",
      +  "maximum": 9,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / children_ages
      Added value: +{
      +  "description": "One age (0-17) per child with their OWN seat, as of the last flight of the trip.",
      +  "items": {
      +    "maximum": 17,
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / infants_on_lap
      Added value: +{
      +  "description": "Under-2s travelling on an adult's lap (no seat). At most one per adult.",
      +  "maximum": 9,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedInput schema / properties / passengers / description
      Previous value: -"Number of passengers (1-9, default: 1)"New value: +"Total travellers (1-9, default: 1). With adults/children_ages/infants_on_lap, this is worked out for you."
  5. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description discloses important behavioral details: results come from partner inventory, each result is one itinerary with fare_options cheapest first, airline penalties differ from Autonomad fees, DOT 24-hour refund eligibility must only be stated when true, and Basic Economy terms must be repeated exactly. It also clarifies that searching neither reserves nor charges.

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?

The description is front-loaded with purpose and return semantics, then moves into fare caveats and traveler rules. It is long but most sentences carry necessary policy or interpretation guidance; it could be tightened, but it is not padded with irrelevant text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 13 parameters, nested objects, no output schema, and the complexity of fare options, the description is complete enough for an agent to call the tool and interpret results. It explains the result shape, fare_option fields, pricing behavior, refund/change caveats, and traveler composition rules.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaningful semantics beyond the schema: travelers can be any age except the booking account holder, children_ages are as of the last flight, infants_on_lap are at most one per adult, and with children or lap infants the returned price_usd is a total rather than a per-person price.

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 opens with a specific verb and resource: 'Searches flights between two airports ... on a departure date.' It clearly distinguishes this from non-flight searches by resource, but it never explicitly names a sibling alternative or when to choose another flight-related tool.

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?

It gives useful usage context such as 'Searching does not reserve anything or charge anyone' and 'Offer the other fares and let the person choose,' but it does not say when to use this versus alternatives like search_hotels or create_booking_intent. The usage is implied rather than explicitly routed.

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.

Directories

Listed in Claude · AUTONOMAD

Last observed

Resources