Skip to main content
Glama

Search return flights

search_return_flights
Read-onlyIdempotent

Use after search_flights when the traveler wants a specific return, or the next leg of a multi-city trip (once per remaining leg). Takes an outbound itinerary_id; returns complete itineraries with the trip total, needs_leg false once the trip is whole. Filters apply to the leg being chosen. Not needed for an outbound watch.

Input Schema

NameRequiredDescriptionDefault
sortNoOrder of results.price
displayNocompact: one line per option, more options, far fewer tokens; full: every field (what the cards draw). Empty picks for you: compact when the app shows no cards, full when it does.
airlinesNoOnly these marketing carriers, as IATA codes or names.
max_stopsNoMost stops allowed: 0 nonstop, 1, or 2 (2 or more: any number).
max_resultsNoHow many results to return, 1-50.
arrive_afterNoHH:MM, local time at that airport.
checked_bagsNoChecked bags per traveler (0 to 2). Bag fees are only priced for flights within the US and Canada; for other flights the answer says the prices do not include them. The prices then include the bag fees, shown as price_with_bags next to the fare.
depart_afterNoHH:MM, local time at that airport.
itinerary_idYesAn outbound (or partial multi-city) itinerary_id from search_flights or a previous call.
arrive_beforeNoHH:MM, local time at that airport.
carry_on_bagsNoCarry-on bags per traveler (0 or 1). The prices then include the bag fees, shown as price_with_bags next to the fare.
depart_beforeNoHH:MM, local time at that airport.
max_price_usdNoHighest fare to show, USD, as the TOTAL for all travelers together: for a per-person budget, multiply by travelers (2 people at $300 each = 600). Unlike bucket lists, whose price bar is per traveler.
lower_emissionsNoOnly itineraries with lower emissions than is typical for the route.
exclude_airlinesNoLeave out itineraries with any flight sold by these carriers (IATA codes, names or an alliance), by flight number or airline name: for 'not Gol' or 'avoid Air India'.
max_layover_hoursNoLongest layover allowed at every connection, in hours (half hours allowed): for 'layovers no longer than 5 hours'.
min_layover_hoursNoShortest layover allowed at every connection, in hours (half hours allowed): for 'at least 2 hours to connect'.
max_duration_hoursNoLongest itinerary to show, in hours.
connecting_airportsNoOnly itineraries that change planes at these airports (codes or city codes), nonstops included: for 'US connections only' name the hubs.
no_overnight_layoversNoLeave out itineraries with an overnight layover: for 'no overnight at the transit airport'.
exclude_connecting_airportsNoLeave out itineraries that change planes at these airports (codes or city codes).

Output Schema

NameRequiredDescriptionDefault
codeNoOn an error: a machine-readable kind, e.g. unknown_place
noteNoGuidance on totals and next step
fieldNoOn unknown_place: which argument (origin, destination, ...)
countsNopriced, matching_filters, returned integers
searchNoRoute dict plus search_key, outbound_itinerary_id; multi-city adds leg_number, legs_total
statusNook | no_data | error | sign_in_required
filtersNoFilters as the caller gave them
messageNoError or sign-in message from the server wrapper
outboundNoLeg shape: airlines, stops, duration_minutes, segments, layovers
track_urlNoOutbound handoff tracking link (round-trip path only)
highlightsNoThe spread over every matching return: cheapest, cheapest_nonstop, fastest, earliest, latest
search_urlNoslicktrip.com search page link
itinerariesNoItems: itinerary_id, price, return (round trip) or next_leg (multi-city) leg object, needs_leg
legs_chosenNoMulti-city only: leg objects chosen so far
suggestionsNoOn unknown_place: places to offer the traveler, each with code, name, kind (airport, all airports in the city, nearby airport), city, country
places_assumedNoPlace names this call resolved on its own, e.g. 'Portland = Portland, OR (PDX)'; tell the traveler

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / carry_on_bags / description
      Previous value: -"Carry-on bags per traveler (0-1). Prices then include the bag fees: search_flights shows them as price_with_bags next to the fare; a calendar or bucket list prices every day with them."New value: +"Carry-on bags per traveler (0 or 1). The prices then include the bag fees, shown as price_with_bags next to the fare."
    • changedInput schema / properties / checked_bags / description
      Previous value: -"Checked bags per traveler (0-2), priced only for flights within the US and Canada (elsewhere the answer says the prices do not include them). Prices then include the bag fees: search_flights shows them as price_with_bags next to the fare; a calendar or bucket list prices every day with them."New value: +"Checked bags per traveler (0 to 2). Bag fees are only priced for flights within the US and Canada; for other flights the answer says the prices do not include them. The prices then include the bag fees, shown as price_with_bags next to the fare."
    • changedInput schema / properties / max_stops / anyOf
      Previous value: -[
      -  {
      -    "maximum": 2,
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maximum": 9,
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / max_stops / description
      Previous value: -"Most stops allowed: 0 nonstop, 1, or 2."New value: +"Most stops allowed: 0 nonstop, 1, or 2 (2 or more: any number)."
  2. Changed1 schema field changed
    • changedInput schema / properties / checked_bags / description
      Previous value: -"Checked bags per traveler (0-2). Prices then include the bag fees: search_flights shows them as price_with_bags next to the fare; a calendar or bucket list prices every day with them."New value: +"Checked bags per traveler (0-2), priced only for flights within the US and Canada (elsewhere the answer says the prices do not include them). Prices then include the bag fees: search_flights shows them as price_with_bags next to the fare; a calendar or bucket list prices every day with them."
  3. Changed2 schema fields changed
    • addedInput schema / properties / carry_on_bags
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 1,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Carry-on bags per traveler (0-1). Prices then include the bag fees: search_flights shows them as price_with_bags next to the fare; a calendar or bucket list prices every day with them.",
      +  "title": "Carry On Bags"
      +}
    • addedInput schema / properties / checked_bags
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 2,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Checked bags per traveler (0-2). Prices then include the bag fees: search_flights shows them as price_with_bags next to the fare; a calendar or bucket list prices every day with them.",
      +  "title": "Checked Bags"
      +}
  4. Changed7 schema fields changed
    • addedInput schema / properties / connecting_airports
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Only itineraries that change planes at these airports (codes or city codes), nonstops included: for 'US connections only' name the hubs.",
      +  "examples": [
      +    [
      +      "MIA",
      +      "ATL",
      +      "IAH"
      +    ]
      +  ],
      +  "title": "Connecting Airports"
      +}
    • addedInput schema / properties / exclude_airlines
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Leave out itineraries with any flight sold by these carriers (IATA codes, names or an alliance), by flight number or airline name: for 'not Gol' or 'avoid Air India'.",
      +  "examples": [
      +    [
      +      "G3"
      +    ],
      +    [
      +      "Gulf Air",
      +      "Air India"
      +    ]
      +  ],
      +  "title": "Exclude Airlines"
      +}
    • addedInput schema / properties / exclude_connecting_airports
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Leave out itineraries that change planes at these airports (codes or city codes).",
      +  "examples": [
      +    [
      +      "DOH"
      +    ],
      +    [
      +      "LOND"
      +    ]
      +  ],
      +  "title": "Exclude Connecting Airports"
      +}
    • addedInput schema / properties / lower_emissions
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Only itineraries with lower emissions than is typical for the route.",
      +  "title": "Lower Emissions"
      +}
    • addedInput schema / properties / max_layover_hours
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 26,
      +      "minimum": 0.5,
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Longest layover allowed at every connection, in hours (half hours allowed): for 'layovers no longer than 5 hours'.",
      +  "title": "Max Layover Hours"
      +}
    • addedInput schema / properties / min_layover_hours
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 26,
      +      "minimum": 0.5,
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Shortest layover allowed at every connection, in hours (half hours allowed): for 'at least 2 hours to connect'.",
      +  "title": "Min Layover Hours"
      +}
    • addedInput schema / properties / no_overnight_layovers
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Leave out itineraries with an overnight layover: for 'no overnight at the transit airport'.",
      +  "title": "No Overnight Layovers"
      +}
  5. Changed1 schema field changed
    • addedInput schema / properties / display
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "compact",
      +        "full"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "compact: one line per option, more options, far fewer tokens; full: every field (what the cards draw). Empty picks for you: compact when the app shows no cards, full when it does.",
      +  "title": "Display"
      +}
  6. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, open-world, so the safety profile is covered. The description adds genuine workflow behavior beyond that: it consumes an existing itinerary_id, and the response carries a trip total plus a needs_leg flag that goes false once the trip is complete. That state-machine detail is the most valuable thing here and is not in the annotations.

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

Conciseness5/5

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

Four dense sentences, no filler, and the ordering is right: usage condition first, required input second, return semantics third, exclusion last. Nothing here restates the title or the annotations.

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?

For a 21-parameter tool with an output schema, the description covers the parts structured fields cannot: when in the booking flow to call it, that it must be called once per remaining leg, how filters scope, and what makes the trip 'whole'. Safety and parameter detail are already handled by annotations and the schema.

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% across 21 parameters, including long, well-illustrated descriptions for display, bag fees, price totals, and layover filters, so the schema carries the full per-parameter burden and baseline 3 applies. The description's one global clarification — 'Filters apply to the leg being chosen' — is useful scoping information, but it is not parameter-specific detail.

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?

Names a specific verb and resource (search return flights) and anchors it to a named sibling: 'Use after search_flights'. It also states the scope precisely — one call per remaining leg of a multi-city trip — which an agent could not infer from the name alone.

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?

Explicit sequencing rule (after search_flights), explicit trigger (traveler wants a specific return, or the next leg), explicit cadence (once per remaining leg), and an explicit exclusion: 'Not needed for an outbound watch.' This routes the agent correctly against the large sibling set.

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