Skip to main content
Glama

Search flights

search_flights
Read-onlyIdempotent

Find flights between two cities or airports and pick the dates. Handles vague requests directly — e.g. 'mid-December, 2-3 days, not on a weekend': pass earliest_depart/latest_return, nights_min/nights_max and avoid_weekdays and it returns the cheapest matching date pairs with fares. Also: exact dates, no date (cheapest dates), no destination (cheapest destinations, same filters apply). With dates (exact or a window) it checks live fares on Google Flights; otherwise, and as a fallback, it uses fares Aviasales travellers saw recently, each with the day seen and a link that reopens that fare at today's price.

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>"
    },
    "name": "search_flights"
  }
}

Input Schema

NameRequiredDescriptionDefault
monthNoFlexible dates within this month, YYYY-MM (used when depart_date is omitted).
adultsNo
originYesDeparture city or airport (name or IATA code), e.g. 'Madrid' or 'MAD'.
currencyNo3-letter currency for fares, e.g. EUR, USD.USD
nights_maxNoLongest stay in nights for a flexible trip ('2-3 days' → 3).
nights_minNoShortest stay in nights for a flexible trip ('2-3 days' → 2).
depart_dateNoDeparture date, YYYY-MM-DD. Omit for flexible dates: returns the cheapest recently seen dates.
destinationNoArrival city or airport (name or IATA code), e.g. 'Lisbon'. Omit for 'anywhere': returns the cheapest destinations.
return_dateNoReturn date, YYYY-MM-DD. Omit for one-way.
latest_returnNoFlexible trip window end, YYYY-MM-DD: be back by this day.
avoid_weekdaysNoDays the trip must not touch, from departure to return day inclusive ('no weekend' → ['sat','sun']).
earliest_departNoFlexible trip window start, YYYY-MM-DD ('mid-December' → 2026-12-10). Use with latest_return and/or nights instead of fixed dates: the tool picks the cheapest date pairs itself.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / avoid_weekdays
      Added value: +{
      +  "description": "Days the trip must not touch, from departure to return day inclusive ('no weekend' → ['sat','sun']).",
      +  "items": {
      +    "enum": [
      +      "mon",
      +      "tue",
      +      "wed",
      +      "thu",
      +      "fri",
      +      "sat",
      +      "sun"
      +    ],
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / earliest_depart
      Added value: +{
      +  "description": "Flexible trip window start, YYYY-MM-DD ('mid-December' → 2026-12-10). Use with latest_return and/or nights instead of fixed dates: the tool picks the cheapest date pairs itself.",
      +  "type": "string"
      +}
    • addedInput schema / properties / latest_return
      Added value: +{
      +  "description": "Flexible trip window end, YYYY-MM-DD: be back by this day.",
      +  "type": "string"
      +}
    • addedInput schema / properties / nights_max
      Added value: +{
      +  "description": "Longest stay in nights for a flexible trip ('2-3 days' → 3).",
      +  "maximum": 30,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / nights_min
      Added value: +{
      +  "description": "Shortest stay in nights for a flexible trip ('2-3 days' → 2).",
      +  "maximum": 30,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  2. Changed4 schema fields changed
    • changedInput schema / properties / depart_date / description
      Previous value: -"Departure date, YYYY-MM-DD."New value: +"Departure date, YYYY-MM-DD. Omit for flexible dates: returns the cheapest recently seen dates."
    • changedInput schema / properties / destination / description
      Previous value: -"Arrival city or airport (name or IATA code), e.g. 'Lisbon'."New value: +"Arrival city or airport (name or IATA code), e.g. 'Lisbon'. Omit for 'anywhere': returns the cheapest destinations."
    • addedInput schema / properties / month
      Added value: +{
      +  "description": "Flexible dates within this month, YYYY-MM (used when depart_date is omitted).",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "origin",
      -  "destination",
      -  "depart_date"
      -]New value: +[
      +  "origin"
      +]
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, open-world and non-destructive, so the description only needs to add behavior — and it does: live Google Flights fares when dates exist, Aviasales recently-seen fares as fallback, with the day-seen and a link that reopens the fare at today's price. That is meaningful data-provenance context an agent needs for interpreting freshness. It stops short of stating freshness windows or any latency/rate characteristics, which keeps it off 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?

Front-loaded with purpose, then mode coverage, then data source. Sentences are dense but each carries information. The final data-source sentence is long and slightly overloaded, packing source, provenance and link behavior into one clause chain, but nothing is truly redundant.

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?

For a 12-parameter tool with no output schema, the description covers the modes an agent must choose between, how flexible-date parameters combine, what is returned (cheapest matching date pairs with fares), and where fares come from. A brief note on result limits or how many date pairs are returned would close the remaining gap.

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 92%, so the baseline is 3, but the description goes further by mapping a concrete natural-language request onto specific parameters ('mid-December, 2-3 days, not on a weekend' → earliest_depart/latest_return, nights_min/nights_max, avoid_weekdays) and by clarifying the relationship between fixed dates and flexible windows. This is genuine guidance beyond the field descriptions.

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 specific verb and resource ('Find flights between two cities or airports') and immediately delimits scope to date/route discovery. The domain is unmistakably distinct from search_hotels, search_transfers and the other siblings, so no reading of the schema is needed to identify it.

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?

Enumerates the operating modes explicitly: vague multi-constraint requests, exact dates, no date (cheapest dates), no destination (cheapest destinations), and states the filters still apply in the no-destination case. The fallback rule ('otherwise, and as a fallback') tells the agent what happens when live fares are unavailable.

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