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

TableJSON Schema
NameRequiredDescriptionDefault
sortNoOrder of results.price
airlinesNoOnly these marketing carriers, as IATA codes or names.
max_stopsNoMost stops allowed: 0 nonstop, 1, or 2.
max_resultsNoHow many results to return, 1-50.
arrive_afterNoHH:MM, local time at that airport.
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.
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.
max_duration_hoursNoLongest itinerary to show, in hours.

Output Schema

TableJSON 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. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, openWorld, non-destructive), so the bar is lower. The description adds stateful behavior beyond that: it consumes an outbound itinerary_id, returns complete itineraries with the trip total, and flips 'needs_leg' to false once the trip is whole, which tells the agent about the tool's role in a multi-step flow.

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?

Three tight sentences with zero padding. The most important fact (when to call it, and after what) is front-loaded, and each subsequent sentence adds a distinct piece of context.

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 an 11-param tool with full schema coverage and an output schema, the description covers sequencing, prerequisites, scope of filters, and the multi-leg flow. Nothing an agent needs to invoke it correctly is missing, and the return-shape mention is a harmless reinforcement of the output schema.

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 description coverage is 100%, so the baseline is 3. The description adds value beyond the schema by clarifying filter scope ('Filters apply to the leg being chosen') and characterizing itinerary_id as an outbound or partial multi-city id, which the schema states only generically.

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?

The description states a specific verb and resource ('search return flights') and anchors it to a sibling: 'Use after search_flights'. It distinguishes the tool from the plain flight search by its role as the second leg, so an agent can tell them apart without opening either schema.

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?

It gives explicit sequencing ('Use after search_flights'), conditions for use ('when the traveler wants a specific return, or the next leg of a multi-city trip'), a repetition rule ('once per remaining leg'), and an exclusion ('Not needed for an outbound watch'). When-not guidance is present alongside the when.

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