Skip to main content
Glama

LockTrip Hotels

Cancel Booking

cancel_booking
Destructive

Cancels an existing booking. Required: bookingId (from list_bookings) and the boolean confirmed; optional reason. This is a two-step safety flow: calling with confirmed:false does NOT cancel and returns only a 'not confirmed' acknowledgement (it does NOT return fees or refund amounts — read those first from get_booking_details); call again with confirmed:true to actually submit the cancellation. On success the response includes cancellationFee + cancellationFeeCurrency when the supplier reported a charged fee (absent means none was reported, not zero); refunds are processed separately. When the cancellation is not accepted, failureReason is one of NOT_FOUND, AFTER_CHECK_IN, NOT_CANCELLABLE_STATUS, SUPPLIER_NOT_CONFIRMED (submitted, under review: do not rebook or retry) or ERROR (not processed: the booking was not cancelled; try again later or contact support). Needs a registered LockTrip account session; guest sessions cannot cancel bookings. Without a signed-in session, pass the user's email instead: LockTrip emails them a sign-in link to their bookings on locktrip.com, and the result has magicLinkSent: true (nothing is shown or changed in this chat). Returns success and a message. This is a destructive, terminal action — confirm with the user before calling with confirmed:true.

Input Schema

NameRequiredDescriptionDefault
emailNoThe user's LockTrip account email. Needed only when there is no signed-in session: LockTrip then emails that address a sign-in link to the user's bookings on locktrip.com (the bookings are not shown in this chat).
reasonNoOptional cancellation reason
bookingIdYesBooking ID to cancel
confirmedYesSet true to confirm cancellation
sessionTokenNoOptional guest-checkout token returned by `guest_login`.

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?

Annotations only declare destructive/not-readOnly; the description goes far beyond, disclosing that `confirmed:false` is a no-op, that absent `cancellationFee` means "not reported" rather than zero, that refunds are separate, and the full `failureReason` taxonomy including the do-not-retry `SUPPLIER_NOT_CONFIRMED` case. Session and guest-session constraints are also surfaced.

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?

It is a single dense block, but front-loaded with the action and required params before the safety flow and edge cases. Nearly every clause carries information, though the `email` magic-link mechanics are explained here and again in the schema, and parentheses make it heavier than ideal.

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 destructive terminal action, the description covers authentication prerequisites, the confirmation gate, success payload (`cancellationFee`, `success`, `message`), and every failure branch. No output schema exists, yet return semantics are described sufficiently for correct follow-up behavior.

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 would be 3, but the description adds real meaning beyond it: the non-obvious no-op semantics of `confirmed:false`, the fallback role of `email` when no session exists, and the optionality of `reason`. Only `sessionToken` behavior is left entirely to 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 ("Cancels an existing booking") and immediately frames the scope via the required `bookingId`, clearly separating it from siblings like `get_booking_details` and `check_cancellation_policy`. An agent can identify both the action and the object without opening the schema.

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?

Explicitly prescribes the two-step flow (`confirmed:false` first, then `confirmed:true`) and names `get_booking_details` as the place to read fees before calling. It also gives an alternative path for unauthenticated sessions (`email` magic link) and instructs the agent to confirm with the user before the terminal call.

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