get_hotel_by_name
Search for hotels by name using the LumbreTravel MCP Server to retrieve a list of matching accommodations.
Instructions
Buscar hoteles por su nombre, retorna la lista de hoteles encontrados.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Nombre del hotel |
Implementation Reference
- src/handlers/tools.handler.ts:806-814 (registration)Registration of the 'get_hotel_by_name' tool including its name, description, and input schema.{ name: 'get_hotel_by_name', description: 'Buscar hoteles por su nombre, retorna la lista de hoteles encontrados.', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Nombre del hotel' } }, required: ['name'] } },
- src/handlers/tools.handler.ts:1503-1509 (handler)Handler logic in callTool method that extracts the 'name' argument, calls apiService.getHotelByName, and returns the result as formatted JSON text.case 'get_hotel_by_name': { const { name } = args as { name: string } const hotel = await this.apiService.getHotelByName(name) return { content: [{ type: 'text', text: JSON.stringify(hotel, null, 2) }] } }
- src/services/api.service.ts:544-552 (helper)Helper method in ApiService that makes a POST request to the backend API endpoint '/integrations/mcp/hotels/get_hotels_by_name' with the hotel name to retrieve matching hotels.async getHotelByName (name: string) { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/hotels/get_hotels_by_name`, { method: 'POST', headers: { ...headers, 'Content-Type': 'application/json' }, body: JSON.stringify({ name }) }) return await this.handleResponse<any>(response) }