Skip to main content
Glama

exportReservations

Export reservations from Mews MCP in CSV, JSON, or Excel formats within a specific date range, ID list, or state filter. Manage data efficiently for reporting or integration.

Instructions

Exports reservations in the specified format and period

Input Schema

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

Implementation Reference

  • Handler function that executes the exportReservations tool logic by spreading input args into requestData and calling mewsRequest on the '/api/connector/v1/exports/reservations' endpoint, returning JSON stringified 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/exports/reservations', requestData); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
  • Input schema for the exportReservations tool, defining properties like StartUtc, EndUtc, Format (enum: Csv, Json, Excel), optional ReservationIds, States, TimeZone; requires StartUtc, EndUtc, Format.
    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, which populates toolMap for lookup and getToolDefinitions for MCP server registration.
    exportReservationsTool,
  • Import statement bringing the exportReservationsTool into the index for registration in allTools.
    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