Skip to main content
Glama

cancel_booking

DestructiveIdempotent

Cancels a hotel booking in two steps: first retrieve the refund and confirmation code, then complete cancellation with the code after user approval.

Instructions

Cancels a booking in two steps. First call it without confirmation_code: you get the refund and a code. Show the refund to the user, and only if they say yes, call again with the code.

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": {
      "locator": "<locator>",
      "reason": "<reason>"
    },
    "name": "cancel_booking"
  }
}

Input Schema

NameRequiredDescriptionDefault
reasonYes
locatorYes6 letters or digits, e.g. ABC123
confirmation_codeNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the destructiveHint/idempotentHint annotations, the description discloses the non-obvious trait that the first invocation is effectively a dry run returning a quote and token, while the second carries out the cancellation. It doesn't mention whether the refund is final, what fees apply, or authorization needs, so it stops short of full behavioral disclosure.

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?

Two short sentences with the two-step pattern front-loaded and zero filler; every clause carries an instruction the agent needs to act correctly.

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, multi-invocation tool the critical interaction contract is fully spelled out, and the output schema covers the returned refund details. What's missing is minor but real: no mention of irreversibility, fees, or what to do if the code expires.

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 only 33%, so the description has to carry weight, and it does for the trickiest parameter: confirmation_code's role (omitted on the quote call, supplied from the returned code on the commit call) is explained nowhere in the schema. It adds nothing about locator or reason, but locator is documented in the schema and reason is self-evident.

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 opens with a specific verb+resource ("Cancels a booking") and immediately characterizes it as a two-step operation, which distinguishes it from the sibling get/create/check tools. An agent knows exactly what the tool does and that its shape is a preview-then-commit flow.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit sequencing guidance: call first without confirmation_code to obtain the refund quote and code, show the refund to the user, and call again with the code only on consent. That is both the when-to-use and the when-not-to-use (never commit before user approval), leaving no inference required.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.