getAllRates
Retrieve all enterprise pricing rates with optional filters by rate IDs, service IDs, rate group IDs, or date range updates via Mews MCP server.
Instructions
Returns all rates (pricing) of the enterprise
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| RateGroupIds | No | Filter by rate group IDs | |
| RateIds | No | Filter by specific rate IDs | |
| ServiceIds | No | Filter by service IDs | |
| UpdatedUtc | No | Date range filter for rate updates |
Implementation Reference
- src/tools/rates/getAllRates.ts:41-53 (handler)The async execute function processes input arguments, calls the Mews API endpoint '/api/connector/v1/rates/getAll' using mewsRequest utility, and returns the JSON-formatted 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/rates/getAll', requestData); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
- src/tools/rates/getAllRates.ts:8-39 (schema)Input schema defining optional filters for rates: RateIds (array of strings, max 1000), ServiceIds, RateGroupIds, and UpdatedUtc (object with StartUtc and EndUtc ISO strings).inputSchema: { type: 'object', properties: { RateIds: { type: 'array', items: { type: 'string' }, description: 'Filter by specific rate IDs', maxItems: 1000 }, ServiceIds: { type: 'array', items: { type: 'string' }, description: 'Filter by service IDs', maxItems: 1000 }, RateGroupIds: { type: 'array', items: { type: 'string' }, description: 'Filter by rate group IDs', maxItems: 1000 }, UpdatedUtc: { type: 'object', properties: { StartUtc: { type: 'string', description: 'Start of update date range (ISO 8601)' }, EndUtc: { type: 'string', description: 'End of update date range (ISO 8601)' } }, description: 'Date range filter for rate updates' } }, additionalProperties: false },
- src/tools/index.ts:54-141 (registration)Import of getAllRatesTool from './rates/getAllRates.js' and its inclusion in the allTools array (line 140), which populates toolMap for fast lookup and provides definitions for MCP server registration via getToolDefinitions().// Rates tools import { getAllRatesTool } from './rates/getAllRates.js'; import { getRatePricingTool } from './rates/getRatePricing.js'; // Export tools import { exportAccountingItemsTool } from './exports/exportAccountingItems.js'; import { exportReservationsTool } from './exports/exportReservations.js'; // Availability tools import { getAllAvailabilityBlocksTool } from './availability/getAllAvailabilityBlocks.js'; // Voucher tools import { addVouchersTool } from './vouchers/addVouchers.js'; // Task tools import { getAllTasksTool } from './tasks/getAllTasks.js'; import { addTaskTool } from './tasks/addTask.js'; // Loyalty tools import { getAllLoyaltyMembershipsTool } from './loyalty/getAllLoyaltyMemberships.js'; import { addLoyaltyMembershipsTool } from './loyalty/addLoyaltyMemberships.js'; import { updateLoyaltyMembershipsTool } from './loyalty/updateLoyaltyMemberships.js'; import { deleteLoyaltyMembershipsTool } from './loyalty/deleteLoyaltyMemberships.js'; import { getAllLoyaltyProgramsTool } from './loyalty/getAllLoyaltyPrograms.js'; import { addLoyaltyProgramsTool } from './loyalty/addLoyaltyPrograms.js'; import { updateLoyaltyProgramsTool } from './loyalty/updateLoyaltyPrograms.js'; import { deleteLoyaltyProgramsTool } from './loyalty/deleteLoyaltyPrograms.js'; import { getAllLoyaltyTiersTool } from './loyalty/getAllLoyaltyTiers.js'; import { addLoyaltyTiersTool } from './loyalty/addLoyaltyTiers.js'; import { updateLoyaltyTiersTool } from './loyalty/updateLoyaltyTiers.js'; import { deleteLoyaltyTiersTool } from './loyalty/deleteLoyaltyTiers.js'; // Registry of all available tools export const allTools: Tool[] = [ // Account tools getAllAddressesTool, addAddressesTool, // Customer tools getAllCustomersTool, addCustomerTool, updateCustomersTool, deleteCustomersTool, mergeCustomersTool, // Company tools getAllCompaniesTool, addCompanyTool, updateCompaniesTool, deleteCompaniesTool, // Reservation tools getAllReservationsTool, addReservationTool, updateReservationsTool, cancelReservationsTool, // Configuration tools getConfigurationTool, getAllCountriesTool, getAllCurrenciesTool, getAllTaxEnvironmentsTool, getAllTaxationsTool, getAllLanguagesTool, getLanguageTextsTool, // Finance tools getAllBillsTool, getAllAccountingItemsTool, addAccountingItemsTool, // Payment tools addPaymentTool, chargeCreditCardTool, getAllPaymentsTool, // Services tools getAllServicesTool, getAllSpacesTool, getAllSpaceCategoriesTool, // Account Notes tools getAllAccountNotesTool, addAccountNotesTool, // Rates tools getAllRatesTool, getRatePricingTool,