list_hotels
Retrieve available hotels to associate with activities in travel programs using the LumbreTravel MCP Server.
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 handler function for the 'list_hotels' tool. It calls apiService.getHotels() to retrieve the list of hotels and returns the JSON-stringified response as text content.case 'list_hotels': { const hotels = await this.apiService.getHotels() return { content: [{ type: 'text', text: JSON.stringify(hotels, null, 2) }] } }
- The schema definition for the 'list_hotels' tool, including name, description, and empty input schema (no parameters required).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)Helper method getHotels() in ApiService that performs the actual HTTP GET request to fetch the list of hotels from the backend API.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:38-47 (registration)Registration of the tool handlers on the MCP server: ListToolsRequestSchema maps to listTools() (which includes 'list_hotels' schema), and CallToolRequestSchema maps to callTool() (which dispatches to the specific handler).this.server.setRequestHandler( 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) )