reactivate_hotel
Reactivate inactive hotels by providing their unique ID. This tool integrates with the LumbreTravel MCP Server to restore access and manage travel programs efficiently.
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 handler function that executes the 'reactivate_hotel' tool logic by invoking the API service method and formatting the response.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 definition including name, description, and input schema for 'reactivate_hotel', provided in the listTools response.name: 'reactivate_hotel', description: 'Reactivar un hotel', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'ID del hotel a reactivar' } }, required: ['id'] } }, {
- src/services/api.service.ts:534-542 (helper)The supporting API service method that performs the HTTP PUT 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-47 (registration)The MCP server request handlers registration for listing tools (including 'reactivate_hotel' schema) and calling tools (including 'reactivate_hotel' execution).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) )