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.

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": {
      "slug": "<slug>",
      "reservation_id": "<reservation_id>",
      "cancel_token": "<cancel_token>"
    },
    "name": "cancel_booking"
  }
}

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.2/5.0
Behavior5/5

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

Beyond the annotations (destructive, idempotent, openWorld), it discloses the refund window mechanics, deposit forfeiture, pending-refund semantics, token custody rules, and the exact already_cancelled outcomes for both booking types. This is rich behavioral context an agent could not infer from the structured fields.

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 purpose is front-loaded and each subsequent sentence conveys distinct behavioral rules rather than padding. It is dense and long, and some phrasing (e.g., doubled 'takes no payment' clauses) is circuitous, but no sentence is wasted.

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?

For a destructive, idempotent mutation with complex refund branching, the description covers the key decision points and error states, and an output schema exists for return values. Minor gaps remain around refund-retry failure handling, but overall it is sufficiently complete to invoke safely.

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 is 3, but the description adds meaning: it explains that the cancel_token comes from confirm_booking for unpaid bookings or the payment receipt for paid ones, and notes custody constraints (held only by the paying/confirming agent, or in the customer's emailed receipt). That exceeds the schema's one-line token description.

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 opening sentence gives a specific verb and resource: 'Cancels a confirmed booking.' It clearly frames the operation, and the body elaborates on the two booking types (paid vs. no-payment). It stops short of explicitly contrasting with a sibling like get_cancellation_policy, so it is clear but not fully differentiated.

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 description gives clear conditional guidance on which cancel_token to use (paid vs. non-paid bookings) and explains the refund-window branches that determine outcomes. There is no alternative cancellation tool to route against, but the conditions for each path are spelled out, leaving little ambiguity about when and how to invoke.

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