getRatePricing
Retrieve pricing details for specified rates within a defined period using the API. Input rate IDs, start, and end dates to fetch accurate rate pricing data.
Instructions
Returns prices of rates during the specified period
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| EndUtc | Yes | End date for pricing period (ISO 8601) | |
| RateIds | Yes | Array of rate IDs to get pricing for | |
| StartUtc | Yes | Start date for pricing period (ISO 8601) |
Implementation Reference
- src/tools/rates/getRatePricing.ts:30-43 (handler)The async execute method implementing the core logic of the getRatePricing tool by forwarding input arguments to the Mews API endpoint '/api/connector/v1/rates/getPricing' via 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/rates/getPricing', requestData); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- Input schema defining the required parameters: RateIds (array of strings, max 1000), StartUtc and EndUtc (ISO 8601 strings).inputSchema: { type: 'object', properties: { RateIds: { type: 'array', items: { type: 'string' }, description: 'Array of rate IDs to get pricing for', maxItems: 1000 }, StartUtc: { type: 'string', description: 'Start date for pricing period (ISO 8601)' }, EndUtc: { type: 'string', description: 'End date for pricing period (ISO 8601)' } }, required: ['RateIds', 'StartUtc', 'EndUtc'], additionalProperties: false },
- src/tools/index.ts:56-56 (registration)Import statement bringing in the getRatePricingTool for registration.import { getRatePricingTool } from './rates/getRatePricing.js';
- src/tools/index.ts:141-141 (registration)Inclusion of getRatePricingTool in the allTools array used for tool registry and toolMap.getRatePricingTool,