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 are shown on the booking page before anyone pays (and in create_booking_intent's flight_money_terms), so there is no need to list them in the chat, but never call a fare free to change or free to cancel. Lead with the best options and their prices, in a sentence or two each. When the cheapest fare is Basic Economy (is_basic_economy), say so in ONE short line and repeat its terms exactly as returned (its rule, e.g. 'Basic Economy: '): Basic Economy fares differ by airline, so never describe one's changes or refunds in any other words. Then offer the next fare up and let the person choose. Keep caveats short: the booking page shows every term before payment. 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.

Booking: after showing flights, offer the person a booking link for the one they like. When they pick a flight or fare, say they want to book, or ask how to book, call create_booking_intent with that flight from these results (with the chosen fare) — searching again is not needed to book, and the website re-checks the price at checkout.

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
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.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint/idempotentHint/openWorldHint/non-destructive, but the description adds substantial behavior beyond them: the data source (flight partner airline inventory), the granularity of results (one itinerary, fare_options cheapest-first, each with offer_id, fare brand, rule, bags, dot_24h_refund_eligible, penalties), and the crucial distinction that penalties are 'the AIRLINE's penalties' while Autonomad's own fees appear on the booking page. It also warns not to reinterpret 'not provided by the airline' as 'none' and never to call a fare free to change or cancel.

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

Conciseness3/5

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

Purpose is front-loaded in the first sentence and the body is organized into search/travelers/booking paragraphs, but the text is very long and much of it is chat-formatting prescription ('Lead with the best options ... in a sentence or two each', 'say so in ONE short line') that is repeated in spirit by the closing caveat about the booking page showing terms. Several clauses (DOT 24-hour rule wording, how to phrase Basic Economy) are valuable, but the whole does not fully earn its length for a 13-parameter search call.

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?

There is no output schema, so the description carries the entire burden of explaining returns — and it does: itinerary identity, fare_options ordering, fare brand/cabin/price_usd, rule, bags, dot_24h_refund_eligible, and airline penalty fields. It also covers child/infant traveler rules, party-total pricing, and the handoff to create_booking_intent, leaving nothing an agent needs to call and present results correctly.

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 would be 3, but the description adds real meaning beyond the schema: destination accepts a place name or an IATA code with different search behavior, and the traveler trio (adults, children_ages 'as of the last flight of the trip', infants_on_lap 'at most one per adult') comes with the pricing consequence that price_usd is a party total, never to be divided. It does not enrich every parameter (e.g., place/origin_place payloads are left entirely to the schema), which keeps it just below the top.

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?

Opens with a concrete verb+resource and scope: '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.' It also pins down what a result is ('Each result is ONE itinerary ... with its fare_options, cheapest first'), which no other sibling tool provides, so an agent can distinguish it from search_hotels/search_activities and from create_booking_intent.

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

Usage Guidelines5/5

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

Gives explicit when-to-use and when-not-to-use guidance plus the alternative: after showing results, 'call create_booking_intent with that flight from these results ... searching again is not needed to book.' It also bounds the tool's side effects ('Searching does not reserve anything or charge anyone'), so the agent knows search is a safe pre-booking step.

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.

Resources