Skip to main content
Glama

post_flights_rates

Read-only

Search real-time flight prices from multiple providers by specifying itinerary legs. Filter by cabin, stops, price, and more for one-way, round-trip, or multi-city trips.

Instructions

Overview

Search for available flights with real-time pricing from multiple providers. The itinerary must be sent as a non-empty legs array. Each leg follows the provider SearchLeg shape: required origin, destination, and date (YYYY-MM-DD); optional direction (OUTBOUND or INBOUND); optional per-leg filters that override global filters for that leg only.

Not supported: top-level origin, destination, departureDate, or returnDate — use legs only.

When to Use

  • Listings — live prices for search results UI

  • One-way, round-trip, or multi-city — one leg per segment, in order

  • Filtering — cabin class, stops, price, refundability, times (globally or per leg)

  • Streaming — incremental provider results over SSE

What You Get

  • Offers from multiple providers

  • Itineraries with segments, layovers, and durations

  • Price breakdown (fares, taxes, fees) and baggage hints

Key Features

  • Multi-provider aggregation in one request

  • SSE: send header Accept: text/event-stream on POST /flights/rates, or POST /flights/rates/stream with the same JSON body

  • Global filters, sort

Quick Start

Required: legs (at least one object with origin, destination, date), adults (≥ 1), currency

Round-trip: two legs (e.g. outbound then return with direction OUTBOUND / INBOUND). One-way: one leg.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
legsYesOrdered itinerary legs (provider SearchLeg). One-way: one entry. Round-trip: outbound then inbound. Multi-city / open-jaw: additional legs in travel order.
sortNoSort options for results
adultsYesNumber of adults (12+)
countryNoOptional ISO 3166-1 alpha-2 country code for point of sale
filtersNoOptional filters to refine search results
infantsNoNumber of infants (<2)
childrenNoNumber of children (2-11)
currencyYesISO 4217 currency code
cabinClassNoCabin class (provider SearchFilters codes only). Same enum as filters.cabinClass.
infantAgesNoAge of each infant (under 2, per IATA). Length must equal infants count. Optional — omit if ages are not relevant.
childrenAgesNoAge of each child (2–11 inclusive, per IATA). Length must equal children count. Optional — omit if ages are not relevant.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=true, so safety is covered. The description adds genuinely useful behavioral context the annotations cannot convey: multi-provider aggregation, SSE streaming via Accept header or the /stream path, and that per-leg filters override global filters. It does not mention rate limits or provider-specific quirks, keeping it short of 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.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Markdown headers give good structure and the Overview is front-loaded, but the required parameters (legs, adults, currency) are restated across Overview, Key Features, and Quick Start, and the 'What You Get' section partially duplicates what the schema already implies. It is informative but longer than it needs to be.

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 carries the return-value burden and does so with a 'What You Get' section covering offers, itineraries, and price breakdowns. Combined with streaming and filter behavior, it is nearly complete for an 11-parameter tool, missing only error/empty-result behavior to reach a 5.

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 100%, so the baseline is 3; the description earns more by explaining that legs must be non-empty, that direction accepts OUTBOUND/INBOUND, and that per-leg filters override global ones. The explicit exclusion of top-level origin/destination/departureDate/returnDate adds meaning beyond the schema by steering agents away from invalid shapes.

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+resource+scope: 'Search for available flights with real-time pricing from multiple providers.' It distinguishes itself from sibling tools like post_hotels_rates and get_flights_bookings, and the 'Not supported' note rules out common misuses. An agent knows exactly what this tool does.

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?

'When to Use' explicitly enumerates listings, one-way/round-trip/multi-city, filtering, and streaming. The 'Not supported' section gives a clear negative condition (no top-level origin/destination) and the Quick Start gives concrete input shapes, so when-to-use and when-not-to-use are both covered.

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

Deploy Server

Other Tools