Skip to main content
Glama

search_flights

Read-only

Find cash-priced flights by origin, destination, and date. Get results ranked based on your airline loyalty and travel history.

Instructions

Search for flights by route and date and return cash-priced options.

Results are ranked for the traveler by the search backend — weighing their airline
loyalty/status and travel history alongside flight quality — and returned 10 per page.
To see more options, call again with ``page=2``, ``page=3``, and so on.

Args:
    origin: Origin airport code or city (e.g. "LAX", "SFO", "New York").
    destination: Destination airport code or city (e.g. "NRT", "LHR", "Paris").
    departure_date: Departure date in YYYY-MM-DD format (e.g. "2025-03-15").
    return_date: Optional return date in YYYY-MM-DD format for a round trip. In browse
        mode, round trips are searched as two one-way legs.
    num_passengers: Number of passengers. Defaults to 1.
    cabin_class: Optional cabin class preference. One of:
        "economy", "premium economy", "business", "first".
    mode: Leave as "browse" (default). "book" is a restricted alpha — only use it if
        the user explicitly asks to book a flight.
    page: 1-based results page, 10 options per page. Increment to see more options.
    airlines: Optional airline codes or names for browse mode (e.g. ["UA"] or
        ["United"]). Passed to the Google Flights search API.
    max_stops: Optional maximum stops per direction in browse mode. Use 0 for
        nonstop only, 1 for nonstop or one-stop itineraries.

Returns:
    A ranked, paged list of flight options — airlines, routes, prices, and a link.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNobrowse
pageNo
originYes
airlinesNo
max_stopsNo
cabin_classNo
destinationYes
return_dateNo
departure_dateYes
num_passengersNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, and destructiveHint. Description adds context about ranking based on loyalty/status and travel history, and that results include a link. This goes beyond annotations. No mention of rate limits or auth requirements, but these are less critical given the read-only nature.

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?

Well-structured with a brief introductory sentence, followed by Args and Returns sections. Each parameter description is concise yet informative. Could be slightly shorter, but the level of detail is justified for a tool with 10 parameters and nuanced behavior like mode and pagination.

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 (10 params, pagination, two modes, airline loyalty ranking), the description covers essential aspects: what the results contain, how to paginate, when to use 'book' mode, and optional filters. An output schema exists, so return values are covered. It might benefit from mentioning error cases or limitations, but it's sufficiently complete for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description has an explicit Args section describing every parameter in detail, including examples (e.g., origin 'LAX'), format ('YYYY-MM-DD'), valid values (cabin_class enum), and behavior (page incrementing). Schema has 0% coverage, so description fully compensates, adding significant meaning beyond just the type/required field.

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?

Description clearly states the tool searches for flights by route and date and returns cash-priced options. The verb 'search' and resource 'flights' are specific, and 'cash-priced' distinguishes it from potential points-based searches. Sibling tools are all for different domains (hotels, vehicles), so no confusion.

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?

Provides explicit guidance on pagination (page parameter) and the mode parameter, warning that 'book' is restricted and should only be used if the user explicitly asks to book. Also explains default behavior for num_passengers, airlines, and max_stops. Lacks explicit comparison to alternatives, but the domain difference with siblings makes it clear.

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/gondola-ai/gondola-mcp'

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