update_hotel
Modify hotel details, including name, description, phone, email, and address, using a structured input schema for efficient updates within the LumbreTravel MCP Server.
Instructions
Actualizar un hotel
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | Dirección del hotel | |
| description | Yes | Descripción del hotel | |
| Yes | Email del hotel | ||
| id | Yes | ID del hotel a actualizar | |
| name | Yes | Nombre del hotel | |
| phone | Yes | Teléfono del hotel |
Implementation Reference
- src/handlers/tools.handler.ts:1479-1485 (handler)Handler logic for the 'update_hotel' tool: extracts arguments, calls apiService.updateHotel, and returns the result as text content.case 'update_hotel': { const { id, name, description, phone, email, address } = args const hotel = await this.apiService.updateHotel({ id, name, description, phone, email, address }) return { content: [{ type: 'text', text: JSON.stringify(hotel, null, 2) }] } }
- Input schema definition and tool metadata for 'update_hotel' in the listTools method.{ name: 'update_hotel', description: 'Actualizar un hotel', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'ID del hotel a actualizar' }, name: { type: 'string', description: 'Nombre del hotel' }, description: { type: 'string', description: 'Descripción del hotel' }, phone: { type: 'string', description: 'Teléfono del hotel' }, email: { type: 'string', description: 'Email del hotel' }, address: { type: 'string', description: 'Dirección del hotel' } }, required: ['id', 'name', 'description', 'phone', 'email', 'address'] } },
- src/services/api.service.ts:508-522 (helper)Underlying API service method that performs the HTTP PUT request to update a hotel via the external API.async updateHotel (data: { id: string name: string description: string phone: string email: string address: string }) { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/hotels/update`, { method: 'PUT', headers: { ...headers, 'Content-Type': 'application/json' }, body: JSON.stringify(data) }) return await this.handleResponse<any>(response)