Skip to main content
Glama

Search Google Flights

search_flights
Read-onlyIdempotent

Searches Google Flights for itineraries and current fares between two airports given as IATA codes, and returns the source JSON (best_flights and other flights with price, legs and airports). Set type "2" for one way, or "1" for a round trip with return_date. It does not book tickets and does not cover hotels, trains or car hire. A search with no matches is charged; errors are not. Required: departure_id, arrival_id, outbound_date.

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": {
      "departure_id": "<departure_id>",
      "arrival_id": "<arrival_id>",
      "outbound_date": "<outbound_date>"
    },
    "name": "search_flights"
  }
}

Input Schema

NameRequiredDescriptionDefault
glNoTwo-letter country code that localizes fares, e.g. "us" or "it"; omitted uses source default. No option surcharge; 5 credits per successful request.
hlNoInterface language code, e.g. "en" or "it"; omitted uses source default. No option surcharge; 5 credits per successful request.
typeNoTrip type: "1" round trip, "2" one way; omitted uses source default. No option surcharge; 5 credits per successful request.
adultsNoAdult passenger count, positive integer, e.g. 2; omitted uses source default. No option surcharge; 5 credits per successful request.
currencyNoThree-letter uppercase currency code for prices, e.g. "EUR"; omitted uses source default. No option surcharge; 5 credits per successful request.
arrival_idYesRequired three-letter uppercase IATA arrival airport code, e.g. "LHR"; no default. No option surcharge; 5 credits per successful request.
return_dateNoReturn date in YYYY-MM-DD format, on or after outbound_date, e.g. "2027-01-22"; for round trips (type "1"); optional. No option surcharge; 5 credits per successful request.
departure_idYesRequired three-letter uppercase IATA departure airport code, e.g. "JFK"; no default. No option surcharge; 5 credits per successful request.
travel_classNoCabin class: "1" economy, "2" premium economy, "3" business, "4" first; omitted uses source default. No option surcharge; 5 credits per successful request.
outbound_dateYesRequired outbound date in YYYY-MM-DD format, e.g. "2027-01-15"; no default. No option surcharge; 5 credits per successful request.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changed
    • changedInput schema / properties / adults / description
      Previous value: -"Adult passenger count, positive integer; omitted uses source default. No option surcharge; 5 credits per successful request."New value: +"Adult passenger count, positive integer, e.g. 2; omitted uses source default. No option surcharge; 5 credits per successful request."
    • changedInput schema / properties / arrival_id / description
      Previous value: -"Required three-letter uppercase IATA arrival airport code; no default. No option surcharge; 5 credits per successful request."New value: +"Required three-letter uppercase IATA arrival airport code, e.g. \"LHR\"; no default. No option surcharge; 5 credits per successful request."
    • changedInput schema / properties / currency / description
      Previous value: -"Three-letter uppercase currency code; omitted uses source default. No option surcharge; 5 credits per successful request."New value: +"Three-letter uppercase currency code for prices, e.g. \"EUR\"; omitted uses source default. No option surcharge; 5 credits per successful request."
    • changedInput schema / properties / departure_id / description
      Previous value: -"Required three-letter uppercase IATA departure airport code; no default. No option surcharge; 5 credits per successful request."New value: +"Required three-letter uppercase IATA departure airport code, e.g. \"JFK\"; no default. No option surcharge; 5 credits per successful request."
    • changedInput schema / properties / gl / description
      Previous value: -"Two-letter country code; omitted uses source default. No option surcharge; 5 credits per successful request."New value: +"Two-letter country code that localizes fares, e.g. \"us\" or \"it\"; omitted uses source default. No option surcharge; 5 credits per successful request."
    • changedInput schema / properties / hl / description
      Previous value: -"Interface language code; omitted uses source default. No option surcharge; 5 credits per successful request."New value: +"Interface language code, e.g. \"en\" or \"it\"; omitted uses source default. No option surcharge; 5 credits per successful request."
    • changedInput schema / properties / outbound_date / description
      Previous value: -"Required outbound date in YYYY-MM-DD format; no default. No option surcharge; 5 credits per successful request."New value: +"Required outbound date in YYYY-MM-DD format, e.g. \"2027-01-15\"; no default. No option surcharge; 5 credits per successful request."
    • changedInput schema / properties / return_date / description
      Previous value: -"Return date in YYYY-MM-DD format, on or after outbound_date; optional. No option surcharge; 5 credits per successful request."New value: +"Return date in YYYY-MM-DD format, on or after outbound_date, e.g. \"2027-01-22\"; for round trips (type \"1\"); optional. No option surcharge; 5 credits per successful request."
    • changedInput schema / properties / travel_class / description
      Previous value: -"Cabin class: 1 economy, 2 premium economy, 3 business, 4 first; omitted uses source default. No option surcharge; 5 credits per successful request."New value: +"Cabin class: \"1\" economy, \"2\" premium economy, \"3\" business, \"4\" first; omitted uses source default. No option surcharge; 5 credits per successful request."
    • changedInput schema / properties / type / description
      Previous value: -"Trip type: 1 round trip, 2 one way; omitted uses source default. No option surcharge; 5 credits per successful request."New value: +"Trip type: \"1\" round trip, \"2\" one way; omitted uses source default. No option surcharge; 5 credits per successful request."
  2. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint, so safety is covered; the description adds genuinely new behavior — billing semantics ('A search with no matches is charged; errors are not') and the fact that no ticket is booked. It stops short of describing result caps or pagination, but the cost nuance is the high-value disclosure here.

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?

Four sentences, front-loaded with purpose then output then trip-type semantics then exclusions and billing. The closing 'Required: departure_id, arrival_id, outbound_date' duplicates the schema's required array and is the one sentence that doesn't earn its place.

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?

With no output schema, the description usefully sketches the return payload (best_flights and other flights with price, legs and airports) and covers cost and scope limits. It leaves result volume, sorting and pagination unexplained, which matters for a search that can return many itineraries.

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%, so all ten parameters including enums (type, travel_class) and format patterns are already documented. The description restates the type/return_date relationship and the required trio, which the schema also carries, so it adds little beyond the schema baseline.

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?

Specific verb plus resource ('Searches Google Flights for itineraries and current fares') with the input contract (two airports as IATA codes) and the output shape (source JSON with best_flights, legs, airports) all stated. No sibling tool covers flights, so the tool is unambiguous in this toolset.

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

Usage Guidelines4/5

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

Gives concrete usage rules: set type "2" for one way, "1" for round trip together with return_date, and explicitly excludes booking, hotels, trains and car hire. What's missing is any routing guidance against siblings, but since no other flight tool exists there is little to route to.

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