Skip to main content
Glama

MAQAMI Travel

post_flights_prebooks_prebookid_services

Overview

Add ancillary services such as seat selection or extra baggage to an existing prebook before confirming the final booking.

When to Use

  • Seat selection - Allow users to choose specific seats after prebook

  • Extra baggage - Let users add additional luggage allowance

  • Price update - Required when services change the total booking cost

  • Voucher discount - Optional voucherCode when attaching services changes the total and you need the discount reflected on the new payment intent

What You Get

  • Updated prebook with the selected services attached

  • New payment intent (transactionId, secretKey) reflecting the updated total price (after any voucher discount)

  • Same response format as POST /flights/prebooks for easy integration

Key Features

  • Seat selection: Assign specific seats to each passenger and segment

  • Extra baggage: Add checked baggage or overweight allowances

  • Updated payment: Creates a new Stripe payment intent when the prebook used Stripe (usePaymentSdk: true). For whitelabel/CMI prebooks (used_custom_payment_keys), no new intent is returned — re-charge via WL and submit a fresh JWT at POST /flights/bookings

  • Voucher recalculation: When a voucher applies, the discount is recomputed against the updated total (journey + ancillaries); invalid or expired vouchers return 400 (same as prebook)

  • Modifies in place: Updates the existing prebook record in the database

Quick Start

Provide the prebookId in the URL path and selectedServices in the request body. Optionally pass voucherCode to apply a discount. Use the new transactionId from this response (not the original prebook transactionId) when confirming payment with Stripe and when calling POST /flights/bookings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prebookIdYesThe prebook ID (must have provider_booking_id from initial prebook)
voucherCodeNoAn optional voucher code to apply discounts to the booking. The vouchers API allows creation of these discounts
selectedServicesYesServices to attach (from servicesAttachable.groups in prebook response)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond annotations (readOnly=false, idempotent=false, destructive=false, openWorld=true), the description discloses the mutation semantics in depth: it modifies the prebook in place, emits a new payment intent only when usePaymentSdk was true, returns nothing new for whitelabel/CMI prebooks, and surfaces 400s on invalid/expired vouchers.

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 front-loaded with headed sections that let an agent scan to the relevant part, but it is noticeably long and the 'Key Features' bullets partly restate the 'When to Use' bullets.

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?

With no output schema, the description carries the return-value burden and does so: updated prebook, new transactionId/secretKey, and the warning to use the new transactionId when confirming with Stripe and POST /flights/bookings. Nothing essential is missing for a mutation tool.

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 already 100%, so the baseline is 3; the description earns extra credit by explaining that voucherCode is optional and only relevant when attaching services changes the total, and by directing selectedServices to servicesAttachable.groups in the prebook response.

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?

The Overview states a specific verb+resource+scope: add ancillary services (seat selection, extra baggage) to an existing prebook. It differentiates from the plain prebook flow by specifying this operates on an existing prebookId and references 'POST /flights/prebooks' only as a response-format comparison.

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?

The 'When to Use' section enumerates the concrete cases (seat selection, extra baggage, price update, voucher discount) and the Quick Start states exactly what to pass. It also implicitly gates usage on the prebook having provider_booking_id and on Stripe vs whitelabel payment paths.

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.

Resources