Skip to main content
Glama

Cancel booking

cancel_booking
Destructive

Cancels one grant-authorized booking after explicit user confirmation. Reusing idempotency_key makes retries safe. Kirah refuses cancellations that could refund a charged deposit or restore a paid plan session; an allowed cancellation has no undo.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
grantYesThe capability token from this booking's create_booking response (confirmation.grant). Required: without it there is no way to establish that you are the agent that made this booking. It must carry the `booking:cancel` scope. Tampered, wrong-booking, wrong-tenant, revoked and insufficiently-scoped grants all answer invalid_grant, indistinguishably; an authentic grant past the appointment start answers expired_grant.
tenantYesThe tenant to operate on: the provider.tenant_slug value from the tenant's /.well-known/kirah.json manifest (the tenant's full domain, e.g. <slug>.kirah.ai).
booking_refYesThe reference create_booking returned for the booking you want to CANCEL. It must be the SAME booking the supplied grant was issued for; a mismatch answers invalid_grant, indistinguishably from a forged grant.
agent_metadataNo
idempotency_keyYesREQUIRED — unlike create_booking, this action cannot derive one, because "cancel booking X" is byte-identical whether it is a transport retry or a deliberate second call. Omitting it answers missing_idempotency_key. Reuse the SAME key when retrying the SAME cancellation: the replay returns the original result with idempotent_replay:true, cancels nothing and sends no second notice. The same key against a different booking_ref answers idempotency_conflict.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
demoNo
grantNo
detailNo
reasonNo
end_isoNo
missingNo
outcomeYes
notifiedNo
start_isoNo
policy_feeNo
request_idNo
booking_refNo
booking_urlNo
demo_noticeNo
intake_formNo
payment_urlNo
confirmationNo
service_nameNo
deposit_centsNo
provider_nameNo
status_reasonNo
appointment_idNo
policy_messageNo
retry_after_secNo
cancel_fee_centsNo
already_cancelledNo
idempotent_replayNo

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the destructiveHint annotation, the description discloses that an allowed cancellation has no undo, that unsafe refund/restore cancellations are refused, and that reusing the idempotency_key makes retries safe. This gives the agent critical behavioral expectations not available from annotations or the schema alone.

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?

The description is three tight sentences with no filler. It front-loads the primary action and confirmation requirement, then covers retry safety and refusal constraints. Every sentence contributes either to correct invocation or to setting the correct risk expectation.

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 tool's destructive nature, the description covers the essential operational guardrails: user confirmation, grant authorization, idempotent retries, refusal conditions, and irreversibility. An output schema exists, so return-value documentation is not the description's responsibility. The description is complete enough for an agent to use the tool safely and correctly.

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 description coverage is 80%, with grant, booking_ref, tenant, and idempotency_key already well documented in the schema. The description adds contextual emphasis on the grant requirement and idempotency safety, but it does not materially expand parameter meaning beyond what the schema already provides. A baseline 3 is appropriate given the high schema coverage.

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?

The description states a specific verb and resource: 'Cancels one grant-authorized booking'. The phrase 'after explicit user confirmation' and the cancellation-specific constraints clearly distinguish this tool from siblings like reschedule_booking or get_booking_status. The purpose is unambiguous and immediately usable by an agent.

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 provides clear when-to-use context: cancellation only after explicit user confirmation, and only for grant-authorized bookings. It also states a when-not condition by describing cancellations Kirah refuses (those that refund a charged deposit or restore a paid plan session). It does not explicitly name alternatives such as reschedule_booking, but the cancellation scope is clear enough for correct tool selection.

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.

TDQS

A4.1/5.0
Disambiguation4/5

Each booking lifecycle tool is clearly distinct, and the search/availability tools are generally separated by scope. The closest pair is find_available_services and get_availability, but their descriptions sufficiently distinguish cross-business availability checks from per-service calendar lookups.

Naming Consistency5/5

All tool names follow a consistent snake_case verb_noun pattern, such as create_booking, get_availability, list_services, and reschedule_booking. The verbs are predictable and communicate the action clearly.

Tool Count5/5

Ten tools is a well-scoped size for a local services booking server. Each tool addresses a distinct part of the workflow without unnecessary redundancy or bloat.

Completeness4/5

The tool set covers the core booking journey: discovery, availability, booking creation, status checks, rescheduling, and cancellation. A minor gap is the lack of a list-bookings endpoint, though payment is explicitly handled outside MCP, so core functionality remains intact.

Resources