Skip to main content
Glama

Review cancellation of this booking

prepare_booking_cancellation
Read-onlyIdempotent

Use this when the customer wants to review cancellation of the OAuth-selected existing booking. Do not use for a ride amendment (use prepare_booking_change instead). For its recorded state use get_booking_status; for its timeline use get_booking_history. bookingKey must match the selection. Create onceKey once for this booking/cancellation intent and retain it on unchanged retries; never reuse an amendment key. consent_required returns a private consentUrl carrying the selection and intent; open it in the original signed-in session for current amount/terms, separate action consent and confirmation. Correct invalid_request; not_found denies access; unavailable leaves review unverified. Safe to repeat with authority checked before/after. Retrieving the link stores no cancellation, grants no execution authority and performs no refund, payment or message.

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": {
      "bookingKey": "<bookingKey>",
      "onceKey": "<onceKey>"
    },
    "name": "prepare_booking_cancellation"
  }
}

Input Schema

NameRequiredDescriptionDefault
onceKeyYesCaller-chosen retry key: 16–128 characters from A–Z, a–z, 0–9, underscore or hyphen. Reuse it for the same booking, action and unchanged request facts; use a fresh key for changed facts. The caller creates it; this handoff assigns it no independent expiry or execution authority. Later review still requires a current original session, object, offer and separate action consent.
bookingKeyYesInternal booking ID or visible bookingReference of the one booking already selected by this OAuth connection. Copy the same booking's bookingKey or bookingReference from an available get_offer_status/prepare_offer or authorized booking-read result; prepared returns links, not IDs. Never substitute the supplier offerKey. It grants no access to another booking.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "consentUrl": {
      -        "description": "Open this exact private proposal link in the original signed-in session. Its fragment contains the selected object, action, onceKey and either a complete proposal or explicitly requested changes. Current authority is rechecked and unchanged facts are loaded privately. The existing flow then requires a complete proposal, current price and terms, separate visible action consent and confirmation; the link grants no execution authority.",
      -        "pattern": "^https:\\/\\/platform-api\\.samuelz\\.com\\/app\\/customer-booking\\/manage#request=",
      -        "type": "string"
      -      },
      -      "status": {
      -        "const": "consent_required",
      -        "description": "A private proposal link is ready for review; no action consent or execution grant has been issued.",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "status",
      -      "consentUrl"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "status": {
      -        "description": "invalid_request rejects malformed selection or change facts; not_found denies access to the currently selected booking; unavailable means the handoff could not be supplied safely. No booking action has occurred.",
      -        "enum": [
      -          "invalid_request",
      -          "not_found",
      -          "unavailable"
      -        ],
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "status"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "consentUrl": {
      +        "description": "Open this exact private proposal link in the original signed-in session. Its fragment contains the selected object, action, onceKey and either a complete proposal or explicitly requested changes. Current authority is rechecked and unchanged facts are loaded privately. The existing flow then requires a complete proposal, current price and terms, separate visible action consent and confirmation; the link grants no execution authority.",
      +        "pattern": "^https:\\/\\/platform(?:-api)?\\.samuelz\\.com\\/app\\/customer-booking\\/manage#request=",
      +        "type": "string"
      +      },
      +      "status": {
      +        "const": "consent_required",
      +        "description": "A private proposal link is ready for review; no action consent or execution grant has been issued.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "status",
      +      "consentUrl"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "status": {
      +        "description": "invalid_request rejects malformed selection or change facts; not_found denies access to the currently selected booking; unavailable means the handoff could not be supplied safely. No booking action has occurred.",
      +        "enum": [
      +          "invalid_request",
      +          "not_found",
      +          "unavailable"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "status"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Changed1 schema field changed
    • changedOutput schema / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "consentUrl": {
      -        "description": "Open this exact private proposal link in the original signed-in session. Its fragment contains the selected object, action, onceKey and proposed facts. Current authority is rechecked, then the existing flow requires separate visible action consent and confirmation; the link itself grants no authority.",
      -        "pattern": "^https:\\/\\/platform-api\\.samuelz\\.com\\/app\\/customer-booking\\/manage#request=",
      -        "type": "string"
      -      },
      -      "status": {
      -        "const": "consent_required",
      -        "description": "A private proposal link is ready for review; no action consent or execution grant has been issued.",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "status",
      -      "consentUrl"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "status": {
      -        "description": "invalid_request rejects malformed selection/action facts; not_found denies access to the currently selected booking; unavailable means the handoff could not be supplied safely. No booking action has occurred.",
      -        "enum": [
      -          "invalid_request",
      -          "not_found",
      -          "unavailable"
      -        ],
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "status"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "consentUrl": {
      +        "description": "Open this exact private proposal link in the original signed-in session. Its fragment contains the selected object, action, onceKey and either a complete proposal or explicitly requested changes. Current authority is rechecked and unchanged facts are loaded privately. The existing flow then requires a complete proposal, current price and terms, separate visible action consent and confirmation; the link grants no execution authority.",
      +        "pattern": "^https:\\/\\/platform-api\\.samuelz\\.com\\/app\\/customer-booking\\/manage#request=",
      +        "type": "string"
      +      },
      +      "status": {
      +        "const": "consent_required",
      +        "description": "A private proposal link is ready for review; no action consent or execution grant has been issued.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "status",
      +      "consentUrl"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "status": {
      +        "description": "invalid_request rejects malformed selection or change facts; not_found denies access to the currently selected booking; unavailable means the handoff could not be supplied safely. No booking action has occurred.",
      +        "enum": [
      +          "invalid_request",
      +          "not_found",
      +          "unavailable"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "status"
      +    ],
      +    "type": "object"
      +  }
      +]
  3. Changed3 schema fields changed
    • changedInput schema / properties / bookingKey / description
      Previous value: -"Internal booking ID or visible bookingReference of the one booking already selected by this OAuth connection. Copy a returned ID or reference for that same booking; it grants no access to another booking."New value: +"Internal booking ID or visible bookingReference of the one booking already selected by this OAuth connection. Copy the same booking's bookingKey or bookingReference from an available get_offer_status/prepare_offer or authorized booking-read result; prepared returns links, not IDs. Never substitute the supplier offerKey. It grants no access to another booking."
    • changedInput schema / properties / onceKey / description
      Previous value: -"Caller-chosen retry key: 16–128 characters from A–Z, a–z, 0–9, underscore or hyphen. Reuse it for the same booking, action and unchanged request facts; use a fresh key for changed facts. It grants no execution authority."New value: +"Caller-chosen retry key: 16–128 characters from A–Z, a–z, 0–9, underscore or hyphen. Reuse it for the same booking, action and unchanged request facts; use a fresh key for changed facts. The caller creates it; this handoff assigns it no independent expiry or execution authority. Later review still requires a current original session, object, offer and separate action consent."
    • changedOutput schema / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "consentUrl": {
      -        "pattern": "^https:\\/\\/platform-api\\.samuelz\\.com\\/app\\/customer-booking\\/manage#request=",
      -        "type": "string"
      -      },
      -      "status": {
      -        "const": "consent_required",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "status",
      -      "consentUrl"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "status": {
      -        "enum": [
      -          "invalid_request",
      -          "not_found",
      -          "unavailable"
      -        ],
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "status"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "consentUrl": {
      +        "description": "Open this exact private proposal link in the original signed-in session. Its fragment contains the selected object, action, onceKey and proposed facts. Current authority is rechecked, then the existing flow requires separate visible action consent and confirmation; the link itself grants no authority.",
      +        "pattern": "^https:\\/\\/platform-api\\.samuelz\\.com\\/app\\/customer-booking\\/manage#request=",
      +        "type": "string"
      +      },
      +      "status": {
      +        "const": "consent_required",
      +        "description": "A private proposal link is ready for review; no action consent or execution grant has been issued.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "status",
      +      "consentUrl"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "status": {
      +        "description": "invalid_request rejects malformed selection/action facts; not_found denies access to the currently selected booking; unavailable means the handoff could not be supplied safely. No booking action has occurred.",
      +        "enum": [
      +          "invalid_request",
      +          "not_found",
      +          "unavailable"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "status"
      +    ],
      +    "type": "object"
      +  }
      +]
  4. Changed2 schema fields changed
    • addedInput schema / properties / bookingKey / description
      Added value: +"Internal booking ID or visible bookingReference of the one booking already selected by this OAuth connection. Copy a returned ID or reference for that same booking; it grants no access to another booking."
    • addedInput schema / properties / onceKey / description
      Added value: +"Caller-chosen retry key: 16–128 characters from A–Z, a–z, 0–9, underscore or hyphen. Reuse it for the same booking, action and unchanged request facts; use a fresh key for changed facts. It grants no execution authority."
  5. Added

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations by resolving the apparent mismatch between the cancellation-sounding name and readOnlyHint=true: it states the handoff stores no cancellation, grants no execution authority, and performs no refund, payment or message. It also discloses the consentUrl/session requirement, idempotent retry semantics ('safe to repeat'), and maps each error outcome (invalid_request, not_found, unavailable) to a meaning.

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-loads the selection/scope statement and then the alternatives, which is the right order. The single dense paragraph packs a lot of distinct facts (routing, key hygiene, consent URL, error mapping, safety) with little waste, though the error-code and key-hygiene clauses are terse enough to border on crammed.

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 values need not be spelled out, and the description still explains the one non-obvious output (a private consentUrl that must be opened in the original signed-in session). For a two-parameter preparation tool with mutation-adjacent naming, everything an agent needs to call it safely and interpret failure is present.

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 100% and the schema already documents key format and reuse rules, so the description adds only marginal value there. It does add cross-tool key hygiene not present in the schema ('never reuse an amendment key', 'bookingKey must match the selection'), which meaningfully reduces a plausible failure mode.

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 ('review cancellation of the OAuth-selected existing booking') and immediately distinguishes itself from prepare_booking_change, get_booking_status and get_booking_history. An agent can pick this tool over its siblings without opening any schema.

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?

Explicit when-to-use ('customer wants to review cancellation of the OAuth-selected existing booking'), explicit when-not ('Do not use for a ride amendment'), and explicit routing to alternatives for recorded state and timeline. This is the full when/when-not/alternatives triad.

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