list_hotels
Retrieve all available hotels to associate with an activity in a travel program using LumbreTravel MCP Server, simplifying travel planning and management.
Instructions
Obtiene todos los hoteles disponibles para asociar a una actividad en un programa de viajes
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/handlers/tools.handler.ts:1247-1255 (handler)The MCP tool handler implementation for 'list_hotels'. It calls apiService.getHotels() and returns the JSON stringified list of hotels.case 'list_hotels': { const hotels = await this.apiService.getHotels() return { content: [{ type: 'text', text: JSON.stringify(hotels, null, 2) }] } }
- The input schema definition for the 'list_hotels' tool, which requires no parameters (empty object).name: 'list_hotels', description: 'Obtiene todos los hoteles disponibles para asociar a una actividad en un programa de viajes', inputSchema: { type: 'object', properties: {} } },
- src/services/api.service.ts:374-381 (helper)The helper method in ApiService that performs a GET request to the backend API endpoint '/integrations/mcp/hotels' to retrieve the list of hotels.async getHotels () { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/hotels`, { method: 'GET', headers }) return await this.handleResponse<any[]>(response) }
- src/index.ts:39-48 (registration)MCP server registration of request handlers for listing tools (which includes 'list_hotels' schema) and calling any tool by name (which dispatches to the handler).ListToolsRequestSchema, async () => this.toolsHandler.listTools() ) // Configure handlers for tools this.server.setRequestHandler( CallToolRequestSchema, async (request) => await this.toolsHandler.callTool(request.params.name, request.params.arguments, this.server) ) }