Skip to main content
Glama

Lock hotel rate and get checkout link

post_rates_prebook

Locks a selected hotel rate from an offer ID and returns the final price, cancellation terms, and a MAQAMI checkout link so customers can review and complete payment.

Instructions

Overview

Locks the chosen hotel rate and returns the final price, cancellation terms and a checkout link on MAQAMI's website.

When to Use

When the customer has chosen a hotel, room, dates and guests and reviewed the price and cancellation terms.

Quick Start

Pass the offerId from post_hotels_rates exactly as it was returned.

What You Get

  • prebookId - The locked rate

  • Final price and cancellation terms - For the customer to review

  • checkoutUrl - https://book.maqami.co/booking?prebookId=...

Payment

Bookings are paid and confirmed only on MAQAMI's website. The checkoutUrl opens checkout for this exact rate, where the customer enters guest details, pays securely and receives the confirmation. This tool takes no payment details and does not confirm the booking.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
offerIdYesThe offerId from post_hotels_rates on this server, passed exactly as returned.
timeoutNo
bedTypeIdsNoAn optional array of bed type IDs to specify preferred bed configurations for the rooms being booked. The availability of specific bed types depends on the hotel's inventory.
voucherCodeNoAn optional voucher code to apply discounts to the booking. The vouchers API allows creation of these discounts

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.0.6
    • removedInput schema / properties / addons
      Removed value: -{
      -  "description": "A list of additional services or extras that can be added to the booking. For example, adding an Uber voucher or an esim card. The final booking amount is the sum of the offer's total price and the cost of any addons. Each addon's price is added individually to reflect all extras in the billed total. ",
      -  "items": {
      -    "additionalProperties": false,
      -    "properties": {
      -      "addon": {
      -        "description": "The type of addon service (e.g., uber, esimply).",
      -        "type": "string"
      -      },
      -      "addonDetails": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "destination_code": {
      -            "description": " Short code representing the destination or country (e.g., ES for Spain)",
      -            "type": "string"
      -          },
      -          "end_date": {
      -            "description": "The end date for the add-on service (YYYY-MM-DD format)",
      -            "type": "string"
      -          },
      -          "package_id": {
      -            "description": "Unique identifier of the addon package",
      -            "type": "integer"
      -          },
      -          "start_date": {
      -            "description": "The start date for the add-on service (YYYY-MM-DD format)",
      -            "type": "string"
      -          }
      -        },
      -        "type": "object"
      -      },
      -      "currency": {
      -        "description": "The currency in which the addon service is charged",
      -        "type": "string"
      -      },
      -      "value": {
      -        "description": "The monetary cost of the addon service",
      -        "type": "number"
      -      }
      -    },
      -    "type": "object"
      -  },
      -  "type": "array"
      -}
    • removedInput schema / properties / includeCreditBalance
      Removed value: -{
      -  "description": "Optional flag to include credit line information in the response. When set to true, credit line details will be returned if the user has a credit line available.",
      -  "type": "boolean"
      -}
    • changedInput schema / properties / offerId / description
      Previous value: -"The unique identifier of the selected offer from the search results."New value: +"The offerId from post_hotels_rates on this server, passed exactly as returned."
    • removedInput schema / properties / payment
      Removed value: -{
      -  "additionalProperties": false,
      -  "description": "Optional payment configuration when usePaymentSdk is true",
      -  "properties": {
      -    "descriptorSuffix": {
      -      "description": "Suffix appended to the Stripe payment descriptor (visible on customer's bank statement)",
      -      "type": "string"
      -    },
      -    "gateway": {
      -      "description": "Payment gateway when using partner Stripe keys. Only STRIPE is supported.",
      -      "type": "string"
      -    },
      -    "paymentMethodConfiguration": {
      -      "description": "Stripe Payment Method Configuration ID (pmc_...) controlling which payment methods Payment Element presents. Must exist on the Stripe account that owns the PaymentIntent (LiteAPI or partner when useOwnSecretKey is true).",
      -      "type": "string"
      -    },
      -    "useOwnSecretKey": {
      -      "description": "When true, create the PaymentIntent on the partner's Stripe account (requires configured Stripe keys).",
      -      "type": "boolean"
      -    }
      -  },
      -  "type": "object"
      -}
    • removedInput schema / properties / usePaymentSdk
      Removed value: -{
      -  "description": "Specifies whether the fields needed to call the payment processing SDK are returned. Set to true if using the SDK for payment processing.",
      -  "type": "boolean"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "offerId",
      -  "usePaymentSdk"
      -]New value: +[
      +  "offerId"
      +]
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare the safety profile (readOnlyHint=false, idempotentHint=false, openWorldHint=true), so the bar is lower. The description adds genuinely useful context the annotations cannot convey: this only locks a rate, takes no payment details, and does not confirm the booking — payment happens on MAQAMI's website via the returned checkoutUrl. It omits any mention of how long a lock survives or expiry behavior.

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?

Sectioned with headers (Overview/When to Use/Quick Start/What You Get/Payment) and front-loaded with the core action. The 'What You Get' list is efficient, though the prose is slightly longer than strictly necessary.

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?

No output schema exists, but the description compensates by enumerating the return payload (prebookId, price, terms, checkoutUrl) and explaining the downstream flow. With annotations covering safety and 75% schema coverage on params, only the undocumented `timeout` leaves a gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 75%, so bedTypeIds and voucherCode are already documented in the schema. The description reinforces that offerId must come from post_hotels_rates 'exactly as it was returned', adding a real constraint, but the undocumented `timeout` parameter is addressed nowhere. Baseline 3 is appropriate.

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 — 'Locks the chosen hotel rate' — and enumerates the exact outputs (final price, cancellation terms, checkout link). It is clearly distinguished from siblings by naming post_hotels_rates as the source of the offerId and get_prebooks_prebookid as the retrieval counterpart.

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 a concrete precondition (customer has chosen hotel, room, dates, guests and reviewed price/terms) and the 'Quick Start' names the upstream tool post_hotels_rates. It does not state when-not to use this or name an alternative prebook path, so it stops short of a 5.

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