Skip to main content
Glama

Got a Plan Trip Planner

Add a flight already booked

add_booked_flight

Saves flights the traveller booked themselves, such as ones read from a booking confirmation, so no flight search is needed and the legs show as booked. Without trip_id it starts a new trip from them, like start_trip_from_flight: from the day the flight out lands to the day the flight home leaves (or nights after landing when there is no flight home yet), with the new-trip draft's wishes and focus. With trip_id it fits that trip to them: the flight out sets the first day, the flight home the last, nights move as with set_trip_fare. With trip_id and leg_key it saves one flight for that leg of the route, booked; for a leg between stops the flight has to leave on the leg's day. Times are local at each airport and go in the trip's calendar. Shows the trip in the planner.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "add_booked_flight"
  }
}

Input Schema

NameRequiredDescriptionDefault
outNoThe flight out, or with leg_key the flight for that leg
backNoThe flight home
nameNo
priceNoWhat the traveller paid, all travellers, both ways
adultsNo
nightsNoFor a new trip with no flight home yet: nights after landing
countryNoFor a new trip: the country it is in, when not the arrival airport's
leg_keyNoWith trip_id: the leg this one flight is for (give it as out)
replaceNoTrue when a flight already booked on this trip was changed and this one replaces it; without it a different flight on the same side is refused
trip_idNo
currencyNo
booking_refNoBooking reference (PNR), kept as the legs' note

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only declare this is a non-destructive write; the description adds the real behavioral payload: existing trips are mutated (first day set by the outbound, last day by the return, nights shift like set_trip_fare), the trip is surfaced in the planner, and a conflicting flight is refused unless replace=true. It stops short of covering reversibility or what happens to a partially filled leg, so it is strong but not exhaustive.

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 is front-loaded in the opening clause and every subsequent clause carries a distinct rule (trip creation, trip fitting, single-leg saving, local-time handling). The prose is dense and noticeably run-on, forcing careful parsing of nested clauses, which keeps it from a 5.

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?

For a 12-parameter mutation tool with no output schema, the description covers the branching logic, side effects on trip dates, the duplicate-refusal rule, and time-zone semantics. Only the return value and the handling of pricing/traveller fields are left unaddressed, which are minor relative to the covered complexity.

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 67%, and the description compensates for the gaps that matter: it explains the trip_id modes, that leg_key identifies one flight of a route and must depart on that leg's day, that nights applies only to a new trip without a return flight, and that replace overrides the duplicate-refusal. It adds little about name, adults, price, or currency beyond the schema.

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?

States a specific verb and resource ('Saves flights the traveller booked themselves') plus the immediately observable outcome ('legs show as booked', 'no flight search is needed'). It also separates itself from siblings by name (start_trip_from_flight, set_trip_fare) so the agent knows this is not a search tool.

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?

Enumerates the three calling modes by parameter combination: no trip_id creates a new trip, trip_id alone fits an existing trip, trip_id plus leg_key saves a single leg. It even names the analogous sibling for each mode, which is about as explicit as when-to-use guidance gets.

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.