cancelReservations
Cancel hotel reservations in Mews by providing reservation IDs, specifying reasons, notes, and fee options.
Instructions
Cancels specified reservations
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ReservationIds | Yes | Array of reservation IDs to cancel | |
| CancellationReason | No | Reason for cancellation | |
| Notes | No | Cancellation notes | |
| ChargeCancellationFee | No | Whether to charge cancellation fee |
Implementation Reference
- Executes the tool by parsing input args, sending a request to Mews API /api/connector/v1/reservations/cancel, and returning the JSON result.async execute(config: MewsAuthConfig, args: unknown): Promise<ToolResult> { const inputArgs = args as Record<string, unknown>; const requestData = { ...inputArgs }; const result = await mewsRequest(config, '/api/connector/v1/reservations/cancel', requestData); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- Input schema defining the parameters for canceling reservations, with ReservationIds required.inputSchema: { type: 'object', properties: { ReservationIds: { type: 'array', items: { type: 'string' }, description: 'Array of reservation IDs to cancel', maxItems: 1000 }, CancellationReason: { type: 'string', description: 'Reason for cancellation' }, Notes: { type: 'string', description: 'Cancellation notes' }, ChargeCancellationFee: { type: 'boolean', description: 'Whether to charge cancellation fee' } }, required: ['ReservationIds'], additionalProperties: false },
- src/tools/index.ts:24-24 (registration)Import statement bringing the cancelReservationsTool into the central tools index.import { cancelReservationsTool } from './reservations/cancelReservations.js';
- src/tools/index.ts:109-109 (registration)Includes the cancelReservationsTool in the allTools array for global tool registry and lookup via toolMap.cancelReservationsTool,