Skip to main content
Glama

Cancel a booking

cancel_booking
DestructiveIdempotent

Cancel (取消預約) a confirmed, pending or awaiting_payment booking made with request_booking, when the customer asks to. Frees the place for others and cannot be undone; a booking paid online is refunded minus the card processing fee Stripe charged and BOP's fee (5.5% + NT$10). Online cancellation closes at the business's cutoff (online_cancellation in get_business; 120 minutes before the start time unless the business sets its own cutoff).

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": {
      "business_id": "<business_id>",
      "booking_id": "<booking_id>",
      "status_token": "<status_token>"
    },
    "name": "cancel_booking"
  }
}

Input Schema

NameRequiredDescriptionDefault
booking_idYesbooking_id returned by request_booking
business_idYesbusiness_id from search_businesses
status_tokenYesstatus_token returned once by request_booking

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations (destructiveHint, idempotentHint) by disclosing irreversibility, the refund formula minus Stripe processing fee and BOP's 5.5% + NT$10, and the hard cutoff after which online cancellation is unavailable. These are exactly the consequences an agent needs before invoking a destructive operation.

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?

Three sentences, front-loaded with the action and eligibility, then consequences, then the cutoff rule. Dense but every clause carries information; the refund arithmetic and cutoff parentheticals are heavy but operationally necessary.

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 3-parameter mutation with no output schema, it covers eligibility, irreversibility, refund economics, and timing constraints. It omits edge behavior such as what happens if the booking is already cancelled or past cutoff, and whether status_token expires, but the essential picture is complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so booking_id, business_id and status_token are already documented with their provenance. The description adds no additional syntax, format, or validity constraints on these parameters, leaving the schema to carry the load, which is the correct baseline.

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 (cancel) with the resource (booking), the eligible statuses (confirmed, pending, awaiting_payment), and the originating sibling tool (request_booking), so an agent can distinguish it from modify_booking or complete_booking. The localized gloss '(取消預約)' is a minor addition, not the substance.

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 ('when the customer asks to') and an operational window (online cancellation closes at the business's cutoff, 120 minutes before start unless overridden, retrievable via get_business). It does not name modify_booking as the alternative for non-cancellation changes, so the when-not-to-use case is only implied.

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.