Skip to main content
Glama

Threshold

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
confirmYes
booking_idYes
guest_emailNo
expected_refund_centsNoRequired when confirm is true: refund.amount from the confirm=false call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already flag destructive/openWorld/idempotent, but the description adds critical context: the confirm=false call is non-mutating ('nothing changes'), refunds auto-post to the guest's card, and a mid-flight refund change fails with 'refund_changed' instead of cancelling. That failure-mode and side-effect disclosure is exactly what annotations alone don't convey.

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 'Two-step' and then walks the workflow in tight sentences with no filler. It is slightly dense/long for a single tool but every clause carries operational weight.

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?

No output schema exists, so the description carries the return burden and does — it explains what the confirm=false call returns (the refund the guest gets back). Combined with the failure mode and auth note, an agent has everything needed to call both steps correctly.

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

Parameters5/5

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

With only 25% schema coverage the description must compensate, and it does: it defines the confirm flag semantics, ties expected_refund_cents to the value from the first call, and explains guest_email as 'the email the booking was made with' with the agent-token exception. Only booking_id is left to obvious inference.

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') and immediately adds a distinctive two-step workflow that no sibling (all read/get/send tools) shares. An agent can tell this apart from get_booking or request_booking without opening the 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 explicit sequencing: call with confirm=false first, get guest go-ahead, then confirm=true with expected_refund_cents. It also states an auth exception ('unless you connect with an agent token'). It stops short of naming sibling alternatives, so it lands just below the top.

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