Skip to main content
Glama

search_flights_flexible

Compare flight prices across a range of dates to find the cheapest day to fly. Enter departure and arrival airports and a date range to see daily prices sorted by cost.

Instructions

Search for flights across a range of dates to find the cheapest day to fly. Returns one result per date sorted by price — ideal for answering "When's the cheapest time to fly to Tokyo in April?".

Uses one API credit per date searched (capped at 30 days). Failures on individual dates are returned as errors rather than failing the whole request.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
glNoCountry code
hlNoLanguage code
typeNo1=Round trip, 2=One way (default)
stopsNo0=Any, 1=Nonstop only, 2=1 stop or fewer, 3=2 stops or fewer
adultsNoNumber of adults
date_toYesEnd of date range to search (YYYY-MM-DD, max 30 days from date_from)
currencyNoCurrency code (e.g. GBP, EUR, USD)
date_fromYesStart of date range to search (YYYY-MM-DD)
max_priceNoMaximum ticket price
arrival_idYesArrival airport IATA code (e.g. EZE). Comma-separate for multiple.
return_dateNoFixed return date (YYYY-MM-DD) for round-trip. Omit for one-way.
departure_idYesDeparture airport IATA code (e.g. LHR). Comma-separate for multiple.
travel_classNo1=Economy, 2=Premium economy, 3=Business, 4=First
Behavior5/5

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

With no annotations provided, the description carries full burden and delivers by disclosing API credit cost per date (capped at 30 days), error handling for individual date failures, and the sorted result format. This goes beyond basic safety profiles and gives agents crucial operational detail.

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?

The description is two short paragraphs, front-loaded with the core purpose and followed by essential cost/error details. Every sentence adds value, with no redundant or filler content.

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?

Given the tool's complexity (13 parameters) and lack of output schema, the description covers the key aspects: purpose, use case, cost, error behavior, and result shape. It does not detail the returned result fields, but the schema and sibling tools provide additional context, making this adequate though not exhaustive.

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 the baseline is 3. The description itself does not add significant parameter-level meaning beyond what the schema provides, though it contextualizes the date range and output format. It neither compensates nor detracts from the schema coverage.

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 clearly states the tool searches flights across a range of dates to find the cheapest day, with a specific verb and resource. It also specifies the output (one result per date sorted by price) and provides an example use case, distinguishing it from sibling tools like search_flights.

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?

The description provides clear context for when to use this tool via the 'ideal for' phrase, targeting flexible-date searches. It does not explicitly name alternatives or exclusions, but the use case is clear enough for an agent to select it appropriately.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/RuairidhT/flights-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server