reactivate_hotel
Reactivate a deactivated hotel in the LumbreTravel system by providing its unique ID to restore availability for bookings and management.
Instructions
Reactivar un hotel
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID del hotel a reactivar |
Implementation Reference
- src/handlers/tools.handler.ts:1495-1501 (handler)The execution handler for the 'reactivate_hotel' tool within the callTool switch statement. It destructures the 'id' from arguments and calls the ApiService's reactivateHotel method.case 'reactivate_hotel': { const { id } = args as { id: string } const hotel = await this.apiService.reactivateHotel(id) return { content: [{ type: 'text', text: JSON.stringify(hotel, null, 2) }] } }
- The tool schema definition including name, description, and inputSchema for 'reactivate_hotel' in the listTools method.name: 'reactivate_hotel', description: 'Reactivar un hotel', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'ID del hotel a reactivar' } }, required: ['id'] } },
- src/index.ts:44-47 (registration)Registration of the tool call handler in the MCP server, which delegates to ToolsHandler.callTool for executing tools like 'reactivate_hotel'.this.server.setRequestHandler( CallToolRequestSchema, async (request) => await this.toolsHandler.callTool(request.params.name, request.params.arguments, this.server) )
- src/services/api.service.ts:534-542 (helper)The ApiService helper method that performs the actual API request to reactivate a hotel by ID.async reactivateHotel (id: string) { const headers = await this.getHeaders() const response = await fetch(`${API_CONFIG.baseUrl}/integrations/mcp/hotels/reactivate`, { method: 'PUT', headers, body: JSON.stringify({ id }) }) return await this.handleResponse<any>(response) }
- src/index.ts:38-41 (registration)Registration of the listTools handler, which includes the 'reactivate_hotel' tool in the returned list.this.server.setRequestHandler( ListToolsRequestSchema, async () => this.toolsHandler.listTools() )