Skip to main content
Glama

Cancel a booking or request

cancel_booking
DestructiveIdempotent

Two-step. First call with confirm=false to see what the guest gets back if they cancel now (nothing changes). Tell the guest that refund and get their go-ahead, then call again with confirm=true and expected_refund_cents set to the refund amount from the first call. If the refund changed in between, the call fails with refund_changed instead of cancelling. Refunds go to the guest's card automatically. Pass guest_email (the email the booking was made with) unless you connect with an agent token.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmYesFalse to preview the refund without changing anything; true to cancel.
booking_idYesThe booking or request to cancel.
guest_emailNoThe email the booking was made with. Needed unless you connect with an agent token.
expected_refund_centsNoRequired when confirm is true: refund.amount from the confirm=false call.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
refundNoAn amount in cents with its currency.
bookingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / booking_id / description
      Added value: +"The booking or request to cancel."
    • addedInput schema / properties / confirm / description
      Added value: +"False to preview the refund without changing anything; true to cancel."
    • addedInput schema / properties / guest_email / description
      Added value: +"The email the booking was made with. Needed unless you connect with an agent token."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "With confirm=false, what the guest would get back if they cancelled now; with confirm=true, the cancelled booking and the refund.",
      +  "properties": {
      +    "booking": {
      +      "type": "object"
      +    },
      +    "refund": {
      +      "description": "An amount in cents with its currency.",
      +      "properties": {
      +        "amount": {
      +          "type": "integer"
      +        },
      +        "currency": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations (destructive, idempotent, openWorld), the description discloses the two-step safety pattern, that the preview is side-effect-free, that refunds go to the guest's card automatically, and a specific failure mode (refund_changed aborts the cancellation). It also covers the auth nuance around guest_email vs. agent token, which annotations do not convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Five tight sentences, front-loaded with 'Two-step.' Every sentence carries operational weight: the preview semantics, the required handoff to the guest, the confirmation call, the failure mode, and the auth exception. No filler or repetition of schema text.

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, so return values need no explanation, and the description covers the remaining burden for a destructive mutation: sequencing, side effects, failure behavior, and authentication. Nothing an agent needs to invoke this safely and correctly appears to be missing.

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 real meaning: expected_refund_cents must be the refund.amount from the prior confirm=false call, and passing a stale value triggers refund_changed. It also clarifies guest_email is the email the booking was made with and is only skippable with an agent 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 states a specific verb+resource (cancel a booking or request) and immediately frames it as a two-step preview-then-commit operation. It is unambiguous about what the tool does, though it never explicitly contrasts itself with siblings like get_booking or request_booking, leaving that differentiation to the reader.

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 gives clear procedural when-to-use guidance: call first with confirm=false to preview (nothing changes), get the guest's go-ahead, then call with confirm=true. It also states the guest_email requirement and the agent-token exception. What's missing is any explicit routing against alternative tools (e.g., when to read a booking instead of cancelling it).

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