Skip to main content
Glama

Flight prices across dates

search_flight_prices_by_date
Read-only

Return the cheapest Google Flights fare for each departure date between two airports across a range of at most 31 days (one results-page search per date, so a long range is slow). Each row has the date, the return date for round trips (departure plus trip_duration) and the lowest total USD price for all passengers; a date with no itineraries is omitted. degraded with an error means some or all dates failed and the list holds only the dates that answered. Prices change minute to minute. Requires a paid plan; one live search request, weight 2 on API plans, up to 25 s. Airports are IATA codes; is_round_trip needs trip_duration; passengers is 1-9. Read-only.

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>",
      "start_date": "<start_date>",
      "end_date": "<end_date>"
    },
    "name": "search_flight_prices_by_date"
  }
}

Input Schema

NameRequiredDescriptionDefault
originYesIATA code for the departure airport, e.g. "JFK"
end_dateYesEnd of the date range in YYYY-MM-DD format, at most 30 days after start_date
jmespathNoOptional JMESPath projection applied to the response. See initialize.instructions for grammar and examples.
passengersNoNumber of passengers (1-9, default 1)
start_dateYesStart of the date range in YYYY-MM-DD format
cabin_classNoCabin class: "economy", "premium_economy", "business", or "first" (optional, default economy)
destinationYesIATA code for the arrival airport, e.g. "LHR"
is_round_tripNoWhether to search round-trip prices (default false). Requires trip_duration when true.
sort_by_priceNoSort results by price ascending (default false, sorts by date)
trip_durationNoTrip duration in days — required when is_round_trip is true (e.g. 7 for a one-week trip)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / end_date / description
      Previous value: -"End of the date range in YYYY-MM-DD format"New value: +"End of the date range in YYYY-MM-DD format, at most 30 days after start_date"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "properties": {
      +      "dates": {
      +        "items": {
      +          "properties": {
      +            "date": {
      +              "type": "string"
      +            },
      +            "price": {
      +              "description": "Lowest total USD price for all passengers.",
      +              "type": "number"
      +            },
      +            "returnDate": {
      +              "description": "Empty for one-way searches.",
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "degraded": {
      +        "description": "True when some or all dates failed; the list holds only the dates that answered.",
      +        "type": "boolean"
      +      },
      +      "error": {
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "required": [
      +      "projection"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "data",
      +      "_attribution"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "_budget_exceeded"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "_jmespath_error"
      +    ]
      +  }
      +]
    • removedOutput schema / properties
      Removed value: -{
      -  "degraded": {
      -    "description": "True when the upstream search failed or returned partial results.",
      -    "type": "boolean"
      -  },
      -  "error": {
      -    "type": "string"
      -  },
      -  "prices": {
      -    "items": {
      -      "properties": {
      -        "currency": {
      -          "type": "string"
      -        },
      -        "date": {
      -          "type": "string"
      -        },
      -        "price": {
      -          "type": [
      -            "number",
      -            "string",
      -            "null"
      -          ]
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "search_metadata": {
      -    "type": [
      -      "object",
      -      "null"
      -    ]
      -  }
      -}
  2. Changed1 schema field changed
    • addedOutput schema / properties / degraded
      Added value: +{
      +  "description": "True when the upstream search failed or returned partial results.",
      +  "type": "boolean"
      +}
  3. First observed

TDQS

A4/5.0
Behavior5/5

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

Despite annotations already covering read-only and open-world traits, the description adds substantial non-obvious behavior: 'degraded with an error' signaling partial failure, omitted dates with no itineraries, the fact that prices change minute to minute (explaining idempotentHint=false), and live-request cost/latency limits.

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?

Purpose and range constraint are front-loaded, and the dense sentences mostly earn their place, though the run-on middle sentences mixing return shape, degraded semantics, and pricing caveats could be split for scanability.

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?

With an output schema and safety annotations already present, the description still covers the row shape, the degraded-partial-failure case, and operational constraints, leaving nothing an agent needs in order to call it correctly.

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 coverage is 100%, so the schema already documents all ten parameters. The description restates a few constraints (IATA codes, trip_duration for round trips, passengers 1-9) that are already in the schema, adding little beyond the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence gives a precise verb+resource+scope: cheapest fare per departure date between two airports over a <=31 day range. It implicitly separates itself from search_flights via the per-date iteration, but never explicitly names that sibling, so an agent must infer the distinction.

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

Usage Guidelines3/5

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

Usage context is implied (comparing prices across a range of dates) and cost guidance is given (paid plan, weight 2, up to 25 s, 'long range is slow'), but there is no explicit when-to-use-this-vs-search_flights routing or exclusion statement.

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.