Skip to main content
Glama

addReservation

Create a new reservation with specified details, including customer ID, service ID, rate plan, check-in/out times, space category, and optional notes or voucher codes, via the Mews hospitality platform API.

Instructions

Adds a new reservation with the specified details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
AdultCountNoNumber of adults
BookingChannelNoChannel for booking
ChildCountNoNumber of children
CustomerIdNoCustomer ID for the reservation
EndUtcYesCheck-out date/time (ISO 8601)
NotesNoReservation notes
RatePlanIdYesRate plan ID
ServiceIdYesService ID
SpaceCategoryIdNoSpace category ID
StartUtcYesCheck-in date/time (ISO 8601)
VoucherCodeNoDiscount voucher code

Implementation Reference

  • The execute function that implements the core logic of the addReservation tool, forwarding input arguments to the Mews API endpoint '/api/connector/v1/reservations/add' 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/add', requestData); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
  • The inputSchema defining the structure and requirements for parameters accepted by the addReservation tool.
    inputSchema: { type: 'object', properties: { CustomerId: { type: 'string', description: 'Customer ID for the reservation' }, ServiceId: { type: 'string', description: 'Service ID' }, RatePlanId: { type: 'string', description: 'Rate plan ID' }, StartUtc: { type: 'string', description: 'Check-in date/time (ISO 8601)' }, EndUtc: { type: 'string', description: 'Check-out date/time (ISO 8601)' }, VoucherCode: { type: 'string', description: 'Discount voucher code' }, BookingChannel: { type: 'string', description: 'Channel for booking' }, Notes: { type: 'string', description: 'Reservation notes' }, SpaceCategoryId: { type: 'string', description: 'Space category ID' }, AdultCount: { type: 'number', description: 'Number of adults' }, ChildCount: { type: 'number', description: 'Number of children' } }, required: ['ServiceId', 'RatePlanId', 'StartUtc', 'EndUtc'], additionalProperties: false },
  • Import statement that brings the addReservationTool into the tools index module.
    import { addReservationTool } from './reservations/addReservation.js';
  • The addReservationTool is added to the central allTools registry array, making it available for execution.
    addReservationTool,

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/code-rabi/mews-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server