Skip to main content
Glama

Zestli

Cancel Booking

cancel_booking
Destructive

Use this when the user wants to cancel a booking previously made through this server (its booking_id, or the ZST-… reference from Zestli's emails and pages), or some parts of it. Cancelling takes two calls with the user's answer in between. First call with preview=true: nothing is cancelled; it returns the refund the user would get now (refund_amount_minor, refund_currency, refund_rule, any cancellation_fee_minor, and per part refund_parts, including a together discount taken back) and a preview_id. Operator-run experiences refund by their published cancellation tiers measured to the booked start time, often partial and 0 after the start; other suppliers refund in full or less the fee shown at checkout. A card only authorized, never charged (such as a request the operator has not accepted) previews not_charged with no refund amount: cancelling releases the authorization and refunds nothing because nothing was taken. The user agrees to the previewed refund, not just to cancelling: a request to cancel is not agreement to an amount they have not seen. Once they confirm that refund, a call without preview, with the same booking_id, segment_ids and the preview_id, cancels, refunds exactly that amount (0 moves no money) and reports it. DESTRUCTIVE and not reversible. If the refund changed since the preview, the call is refused with the new figures and a new preview_id: show them and ask again. If a leg fails or the refund is not confirmed, the message says what to do next.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "request": "<request>"
    },
    "name": "cancel_booking"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestYesInput for cancelling a confirmed booking.

Output Schema

NameRequiredDescriptionDefault
statusYes
messageNo
booking_idYes
error_codeNo
is_sandboxNo
preview_idNo
not_chargedNo
refund_ruleNo
needs_reviewNo
refund_partsNo
refund_outcomeNo
refund_currencyNo
refund_initiatedNo
already_cancelledNo
cancelled_part_idsNo
refund_amount_minorNo
cancellation_fee_minorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Well beyond the annotations, it discloses that cancellation is destructive and irreversible, that the preview call mutates nothing, how refunds are computed per supplier type and per part (including a together discount clawback), the not_charged/authorization-release case, and that a changed refund causes a refusal with a fresh preview_id. It also says what happens on partial failure.

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?

Front-loaded with the trigger, then the preview/confirm flow; each sentence carries operational content. It is dense and long for a single-paragraph description, and the refund-policy detail could be tightened, but there is little pure filler.

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?

An output schema exists, yet the description still names the key return fields needed for the confirmation decision (refund_amount_minor, refund_rule, cancellation_fee_minor, preview_id, not_charged). For a destructive, non-idempotent, multi-part mutation this covers everything an agent needs to act 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% with descriptions on every field, so the baseline is 3, but the description adds meaning the schema does not: that segment_ids must be re-supplied identically on the second call, that the refund is pinned to preview_id, and that parts booked 'only with' a cancelled part are also cancelled. The reason parameter's purpose beyond the schema is not elaborated.

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 ("cancel a booking previously made through this server") plus the accepted identifiers (booking_id or the ZST-… reference) and scope (whole booking or some parts). This distinguishes it from sibling mutators such as cancel_split_payment and request_date_change without the agent having to open another schema.

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?

Gives a clear trigger condition ("Use this when the user wants to cancel") and, unusually, the exact two-call procedure with the user's confirmation in between, plus a specific precondition that a cancel request is not consent to the amount. It stops short of naming a sibling alternative for date changes or split payments, so it is strong context rather than explicit when-not routing.

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