Skip to main content
Glama

post_flights_bookings

Complete a flight reservation by confirming a prebook and processing payment; returns booking ID, itinerary, and provider confirmation.

Instructions

Overview

Complete a flight reservation by confirming a prebook and processing payment. This is the final step in the booking flow.

When to Use

  • Final booking confirmation - Convert a prebook into a confirmed booking

  • Payment completion - Confirm with Stripe (TRANSACTION_ID), bill an enabled credit line (CREDIT), or pay with a credit card (CREDIT_CARD via the secure endpoint)

  • After service selection - Book after optionally attaching seats or baggage via the services endpoint

What You Get

  • Confirmed booking with a unique booking ID

  • Payment confirmation with transaction details

  • Full itinerary including all segments and passenger assignments

  • Provider confirmation reference number

Key Features

  • Idempotent: Returns the existing booking (HTTP 200 + data[0].message) if one already exists for the given prebookId. Transient book failures are retried in place without exposing a terminal failure status. Concurrent duplicate requests while a book is in progress return HTTP 409 (45035).

  • Payments: Stripe uses transactionId from prebook or attach-services after SDK confirmation; credit line uses CREDIT with server-side eligibility checks; CREDIT_CARD charges the provided card immediately — send card details in billingInfo via https://pci-book.liteapi.travel (contact the team to enable this on your API key)

  • Provider confirmation: Finalizes the reservation on the provider side

Quick Start

Required fields: prebookId (from POST /flights/prebooks), payment with method and, for Stripe, transactionId

Tip: If you used POST /flights/prebooks/{prebookId}/services to attach ancillary services, use the new transactionId from that response, not the original prebook transactionId.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paymentYesPayment for `POST /flights/bookings`: Stripe (`TRANSACTION_ID` + `transactionId`), credit line (`CREDIT`), whitelabel/CMI (`THIRD_PARTY` + `token`), or direct card via the secure endpoint (`CREDIT_CARD` + `billingInfo`).
metadataNoOptional. Encapsulates essential booking metadata, including IP, location, language, device details, and marketing parameters.
prebookIdYesThe prebookId returned by `POST /flights/prebooks` (prebook must have completed the book step).
customTagsNoOptional bag of up to 5 user-defined key/value labels persisted with the booking. Keys must match `^[A-Z0-9_-]+$` (uppercase letters, digits, `-`, `_`). Values are arbitrary strings up to 255 characters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior1/5

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

The description explicitly labels the tool 'Idempotent' and describes returning the existing booking for a given prebookId, while the annotations declare idempotentHint=false. This is a direct contradiction between description and structured data, which forces the lowest score regardless of the otherwise rich behavioral detail (409/45035 concurrency handling, transient retries, payment flows).

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?

Organized into scannable Overview / When to Use / What You Get / Key Features / Quick Start sections with the required fields front-loaded at the end. It is long, but nearly every sentence carries actionable content; minor redundancy between the Overview and Key Features sections keeps it from a 5.

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?

For a complex payment/finalization tool with nested objects and no output schema, the description covers the booking flow position, required fields, idempotency, concurrency errors, retry behavior, and all four payment paths. An agent has enough to invoke it correctly without opening sibling tools.

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, but the description adds genuine operational meaning beyond the schema: which payment methods map to which fields, that CREDIT_CARD details go through the secure PCI endpoint, and the tip to use the new transactionId from the services endpoint rather than the prebook one.

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+resource and scope: 'Complete a flight reservation by confirming a prebook and processing payment. This is the final step in the booking flow.' An agent can immediately distinguish this from read siblings like get_flights_bookings and the earlier post_flights_prebooks step.

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 'When to Use' section gives clear triggering conditions (final confirmation, payment completion, after service selection) and references the prebook and services endpoints that precede this call. It does not explicitly name an alternative sibling to use instead, or state when not to call it, so it falls short of full routing guidance.

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