Skip to main content
Glama

exportReservations

Export reservation data from Mews hospitality platform in CSV, JSON, or Excel format for specified date ranges and filters.

Instructions

Exports reservations in the specified format and period

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
StartUtcYesStart date for export (ISO 8601)
EndUtcYesEnd date for export (ISO 8601)
FormatYesExport format (CSV, JSON, etc.)
ReservationIdsNoSpecific reservation IDs to export
StatesNoFilter by reservation states
TimeZoneNoTime zone for date formatting

Implementation Reference

  • The main handler function for the exportReservations tool. It processes input arguments and makes an HTTP request to the Mews API endpoint '/api/connector/v1/exports/reservations' to export reservations.
    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/exports/reservations', requestData); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
  • Input schema defining the parameters for the exportReservations tool, including required StartUtc, EndUtc, Format, and optional filters.
    inputSchema: { type: 'object', properties: { StartUtc: { type: 'string', description: 'Start date for export (ISO 8601)' }, EndUtc: { type: 'string', description: 'End date for export (ISO 8601)' }, Format: { type: 'string', description: 'Export format (CSV, JSON, etc.)', enum: ['Csv', 'Json', 'Excel'] }, ReservationIds: { type: 'array', items: { type: 'string' }, description: 'Specific reservation IDs to export', maxItems: 1000 }, States: { type: 'array', items: { type: 'string' }, description: 'Filter by reservation states' }, TimeZone: { type: 'string', description: 'Time zone for date formatting' } }, required: ['StartUtc', 'EndUtc', 'Format'], additionalProperties: false },
  • Registration of the exportReservationsTool in the central allTools array exported from src/tools/index.ts.
    exportReservationsTool,
  • Import statement bringing the exportReservationsTool into the index for registration.
    import { exportReservationsTool } from './exports/exportReservations.js';

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