get_programs_by_date_range
Retrieve travel programs within a specified date range using the LumbreTravel MCP Server. Input start and end dates to access relevant travel itineraries and activities.
Instructions
Obtiene programas de viajes por rango de fechas
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endDate | No | Fecha de fin del programa (DD-MM-YYYY) | |
| startDate | No | Fecha de inicio del programa (DD-MM-YYYY) |
Implementation Reference
- src/handlers/tools.handler.ts:1140-1152 (handler)Handler logic for executing the 'get_programs_by_date_range' tool. Extracts startDate and endDate from args, formats them using formatDate, calls ApiService.getProgramsByDateRange, and returns the JSON stringified response.case 'get_programs_by_date_range': { const { startDate, endDate } = args const programs = await this.apiService.getProgramsByDateRange( formatDate(startDate), formatDate(endDate) ) return { content: [{ type: 'text', text: JSON.stringify(programs, null, 2) }] } }
- src/handlers/tools.handler.ts:44-60 (schema)Tool definition including name, description, and input schema for 'get_programs_by_date_range' with required properties startDate and endDate.{ name: 'get_programs_by_date_range', description: 'Obtiene programas de viajes por rango de fechas', inputSchema: { type: 'object', properties: { startDate: { type: 'string', description: 'Fecha de inicio del programa (DD-MM-YYYY)' }, endDate: { type: 'string', description: 'Fecha de fin del programa (DD-MM-YYYY)' } } } },
- src/services/api.service.ts:38-50 (helper)Supporting API service method that performs the actual HTTP POST request to retrieve programs by date range using the backend endpoint.async getProgramsByDateRange (startDate: string, endDate: string) { const headers = await this.getHeaders() const dataToSend = new URLSearchParams({ startDate, endDate }) const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/programs/get_programs_by_date_range`, { method: 'POST', headers, body: dataToSend }) return await this.handleResponse<any>(response) }