Skip to main content
Glama

Get Cancellation Policy

get_cancellation_policy
Read-only

Returns the cancellation terms for one rate plan at a TravelOpen partner hotel: whether it is refundable, the free-cancellation window, the refund percentage, a plain-language summary and, given the check-in date, the exact free-cancellation deadline. Takes the propertyId and the ratePlanId from get_hotel_detail.

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": {
      "propertyId": "<propertyId>",
      "ratePlanId": "<ratePlanId>",
      "checkInDate": "<checkInDate>"
    },
    "name": "get_cancellation_policy"
  }
}

Input Schema

NameRequiredDescriptionDefault
languageNoReply language. Falls back to queryText, then English.
queryTextNoShort excerpt of the guest's request, used only to pick the reply language.
propertyIdYesTravelOpen propertyId UUID from search results
ratePlanIdYesratePlanId from get_hotel_detail roomTypes[].ratePlanId
checkInDateYesCheck-in date YYYY-MM-DD — required to compute the exact free-cancel deadline

Output Schema

NameRequiredDescriptionDefault
policyTextYes
ratePlanIdYes
nonRefundableYes
computedDeadlineYes
freeCancelUntilHoursYes
refundPercentAfterWindowYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / propertyId / description
      Previous value: -"OpenTravel propertyId UUID from search results"New value: +"TravelOpen propertyId UUID from search results"
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/openWorldHint=false/destructiveHint=false, and the description adds real behavioral context on top: the result is per-rate-plan, and the exact free-cancellation deadline is derived from the supplied check-in date rather than stored. It omits edge behavior (e.g. what happens for non-refundable rates or missing policies), which keeps it below a 5.

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 tight sentences, front-loaded with the purpose and return fields, followed by the dependency on get_hotel_detail. No filler or redundant phrasing.

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 formatting need not be explained, yet the description still orients the agent on what information is available. Required-parameter provenance is covered, so nothing critical for a correct call is missing.

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 the baseline is 3. The description only restates the sourcing of propertyId/ratePlanId and checkInDate's role in computing the deadline, both of which the schema already documents; it adds the identifier of the upstream tool rather than new parameter meaning.

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 ('Returns the cancellation terms for one rate plan') and enumerates exactly what comes back: refundability, free-cancellation window, refund percentage, plain-language summary, and computed deadline. This clearly separates it from siblings like get_hotel_detail (property data) and cancel_booking (mutation).

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 concrete provenance guidance — take propertyId and ratePlanId from get_hotel_detail — which tells the agent when and how to reach for this tool in a chain. It stops short of naming exclusions or an explicit 'do not use for X, use Y instead' condition.

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