Skip to main content
Glama

addReservation

Create new reservations in Mews hospitality platform by specifying customer, service, dates, and booking details to manage hotel bookings.

Instructions

Adds a new reservation with the specified details

Input Schema

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

Implementation Reference

  • Handler (execute function) for 'addReservation' tool that sends a POST request to the Mews reservations/add endpoint using the mewsRequest utility.
    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) }] }; }
  • Input schema defining the parameters accepted by the addReservation tool, with required fields ServiceId, RatePlanId, StartUtc, EndUtc.
    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 of the addReservationTool for inclusion in the tools registry.
    import { addReservationTool } from './reservations/addReservation.js';
  • Registration of addReservationTool in the allTools array exported for use across the application.
    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