Skip to main content
Glama

prechargeFlightExtraCharges

Create a pending post-booking extra-charge batch for a confirmed flight booking, returning a chargesId and, for Stripe bookings, a PaymentIntent secret to collect payment.

Instructions

Overview

Creates a pending post-booking extra-charge batch for an existing flight booking and returns an opaque chargesId. For Stripe-paid bookings, also creates a PaymentIntent (transactionId + secretKey) when usePaymentSdk is true.

Access

Requires Flights API access. Post-booking extra charges are not enabled by default — contact the LiteAPI support team to request access.

When to Use

  • Attach fees after confirmation (seat change, baggage, admin adjustment)

  • Obtain a Stripe client secret so the customer can confirm payment before POST .../extra-charges/charges

What You Get

  • chargesId — Opaque token required by /extra-charges/charges (do not re-send charge lines)

  • paymentTypes — Locked to the booking's original payment (TRANSACTION_ID or CREDIT)

  • transactionId / secretKey — Present for Stripe bookings when usePaymentSdk is true

  • Existing extras totals plus pending batch totals

Constraints

  • Booking status must be CONFIRMED or PENDING_CONFIRMATION

  • All lines in one request must share the same currency

  • Payment method on /charges must match the original booking payment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chargesYesCharge lines to attach. All lines must use the booking sellingCurrency.
bookingIdYesFlight booking identifier
usePaymentSdkNoRequired true for Stripe bookings so a PaymentIntent is created. Ignored for CREDIT bookings.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations cover safety/idempotency, and the description adds substantial non-obvious behavior on top: the batch is pending until the second call, the opaque `chargesId` must not be re-sent with charge lines, access is gated behind a support request, payment type is locked to the original booking payment, and Stripe PaymentIntent creation depends on `usePaymentSdk`. These are genuine operational preconditions not derivable from the annotations.

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?

Headings (Overview, Access, When to Use, What You Get, Constraints) front-load the purpose and make scanning easy. It is somewhat long for three parameters, with mild overlap between the overview's PaymentIntent mention and the return-value list, but nearly every line carries actionable information.

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?

There is no output schema, so the 'What You Get' section is essential and it fully enumerates the returned artifacts and their downstream use. Combined with the access gating, booking-status and currency constraints, and payment-matching rule, an agent has everything needed to invoke this correctly.

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 still adds meaning: charge lines must all share the booking's sellingCurrency, and `usePaymentSdk` interacts with booking payment type (Stripe vs CREDIT) in a way the schema only partially conveys. It does not add syntax-level detail beyond that.

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 ('Creates a pending post-booking extra-charge batch for an existing flight booking') and names the primary artifact returned (`chargesId`). It also fixes the tool's place in the two-step flow by referencing `/extra-charges/charges` as the subsequent call, which distinguishes it from the sibling `chargeFlightExtraCharges`.

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 concrete triggers (seat change, baggage, admin adjustment, obtaining a Stripe client secret) and the Access section flags that the feature must be enabled by support. It stops short of explicitly saying when not to use this versus the sibling `chargeFlightExtraCharges`, referring to it only by path.

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