Skip to main content
Glama

Cancel Booking

cancel_booking
DestructiveIdempotent

Cancels a confirmed booking. A booking on the business's Advocate calendar that takes no payment through Advocate takes the cancel_token confirm_booking returned, and nothing was paid through it. A paid booking takes the cancel_token from its payment receipt. Within 60 minutes of paying, or before the business's refund window, the full refund is requested; report it as full only after the payment ledger confirms it. After that window the deposit is forfeited under the booking's policy. A pending refund means cancellation is complete while refund verification or retry continues. A paid booking's token is held only by the agent that paid. The token of a booking that takes no payment through Advocate is held by the agent that confirmed it and sits in the customer's emailed receipt. If such a booking is already cancelled (by an earlier call, the customer's emailed link, or the business), the answer is status already_cancelled with refund no_payment, and nothing changes. Cancelling a paid booking twice answers the error already_cancelled with its refund state.

Input Schema

NameRequiredDescriptionDefault
slugYesBusiness slug identifier
cancel_tokenYesThe cancel_token from confirm_booking, or from the payment receipt of a paid booking
reservation_idYesThe reservation's id

Output Schema

NameRequiredDescriptionDefault
refundYesno_payment: a booking that takes no payment through Advocate, nothing was paid through it; full: the payment ledger confirms the refund; none: deposit was forfeited; pending: cancellation is complete and refund verification or retry is pending
statusYesalready_cancelled: a booking that takes no payment through Advocate and was cancelled before this call; nothing changed
currencyYes
pending_centsYes
refunded_centsYes
reservation_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedOutput schema / properties / refund / description
      Previous value: -"no_payment: a free booking, nothing was paid; full: the payment ledger confirms the refund; none: deposit was forfeited; pending: cancellation is complete and refund verification or retry is pending"New value: +"no_payment: a booking that takes no payment through Advocate, nothing was paid through it; full: the payment ledger confirms the refund; none: deposit was forfeited; pending: cancellation is complete and refund verification or retry is pending"
    • removedOutput schema / properties / status / const
      Removed value: -"cancelled"
    • addedOutput schema / properties / status / description
      Added value: +"already_cancelled: a booking that takes no payment through Advocate and was cancelled before this call; nothing changed"
    • addedOutput schema / properties / status / enum
      Added value: +[
      +  "cancelled",
      +  "already_cancelled"
      +]
  2. Changed6 schema fields changed
    • changedInput schema / properties / cancel_token / description
      Previous value: -"The cancel_token from the payment receipt"New value: +"The cancel_token from confirm_booking, or from the payment receipt of a paid booking"
    • changedInput schema / properties / cancel_token / maxLength
      Previous value: -200New value: +400
    • changedInput schema / properties / reservation_id / description
      Previous value: -"The paid reservation's id"New value: +"The reservation's id"
    • changedOutput schema / properties / currency / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / refund / description
      Previous value: -"full: the payment ledger confirms the refund; none: deposit was forfeited; pending: cancellation is complete and refund verification or retry is pending"New value: +"no_payment: a free booking, nothing was paid; full: the payment ledger confirms the refund; none: deposit was forfeited; pending: cancellation is complete and refund verification or retry is pending"
    • changedOutput schema / properties / refund / enum
      Previous value: -[
      -  "full",
      -  "none",
      -  "pending"
      -]New value: +[
      +  "full",
      +  "none",
      +  "pending",
      +  "no_payment"
      +]
  3. Changed4 schema fields changed
    • addedOutput schema / properties / pending_cents
      Added value: +{
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • changedOutput schema / properties / refund / description
      Previous value: -"full: refunded to the payment method; none: the deposit was forfeited under the policy"New value: +"full: the payment ledger confirms the refund; none: deposit was forfeited; pending: cancellation is complete and refund verification or retry is pending"
    • changedOutput schema / properties / refund / enum
      Previous value: -[
      -  "full",
      -  "none"
      -]New value: +[
      +  "full",
      +  "none",
      +  "pending"
      +]
    • changedOutput schema / required
      Previous value: -[
      -  "status",
      -  "reservation_id",
      -  "refund",
      -  "refunded_cents",
      -  "currency"
      -]New value: +[
      +  "status",
      +  "reservation_id",
      +  "refund",
      +  "refunded_cents",
      +  "pending_cents",
      +  "currency"
      +]
  4. Added

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations marking it destructive, idempotent, and open-world, the description discloses refund-window behavior, forfeiture rules, pending refund semantics, token ownership, and specific already-cancelled outcomes. This adds substantial behavioral context without contradicting 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?

The description is front-loaded with the core action and every major paragraph carries relevant cancellation behavior. It is dense and somewhat repetitive around token ownership for unpaid bookings, but the length is justified by the financial and idempotency edge cases.

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?

Given the complexity of cancellation, refunds, token ownership, and double-cancel outcomes, the description is highly complete. Since an output schema exists, it does not need to fully enumerate return fields, and it still explains key status and error outcomes.

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 adds meaningful semantics for cancel_token by explaining that its source differs for paid bookings versus bookings that take no payment through Advocate and noting who holds the token.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with 'Cancels a confirmed booking,' giving a specific verb and resource. It does not explicitly contrast with sibling tools such as get_cancellation_policy, so the purpose is clear but not fully differentiated from related read-only policy tools.

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?

It provides clear situational context for paid versus no-payment bookings, token sources, refund timing, and double cancellation. However, it does not explicitly say when to check get_cancellation_policy first or clearly state when not to call this tool.

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