check_occupancy
Check current and future occupancy status of domes using real-time data to support financial planning and business reporting.
Instructions
Verifica estado de ocupación actual y futura de los domos basado en datos reales
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date_range | No | today |
Implementation Reference
- server-official.js:269-285 (handler)The handler function for the 'check_occupancy' tool. It processes the date_range parameter (default 'today'), retrieves corresponding occupancy data from treepodData, constructs a formatted text response with occupied/available/total pods, rate, and status message, and sets it as toolResult content.case 'check_occupancy': const dateRange = args?.date_range || 'today'; const occupancyData = treepodData.occupancy[dateRange]; let occupancyText = `🏕️ ESTADO DE OCUPACIÓN TREEPOD (${dateRange.toUpperCase()})\n\n`; occupancyText += `✅ Ocupados: ${occupancyData.occupied} pods\n`; occupancyText += `🟢 Disponibles: ${occupancyData.available} pods\n`; occupancyText += `📊 Total: ${occupancyData.total} pods\n`; occupancyText += `📈 Tasa ocupación: ${occupancyData.rate}%\n\n`; occupancyText += occupancyData.rate >= 80 ? '🔥 ¡Excelente ocupación!' : occupancyData.rate >= 60 ? '👍 Buena ocupación' : '⚠️ Ocupación baja - considerar promociones'; toolResult = { content: [{ type: "text", text: occupancyText }] }; break;
- server-official.js:184-198 (registration)Registration of the 'check_occupancy' tool in the tools/list MCP method response, including name, description, and inputSchema defining the date_range parameter.{ name: "check_occupancy", description: "Verifica el estado actual de ocupación de los TreePods", inputSchema: { type: "object", properties: { date_range: { type: "string", enum: ["today", "week", "month"], description: "Rango de fechas para consultar", default: "today" } } } }
- server-official.js:187-197 (schema)Input schema for the check_occupancy tool, specifying date_range as a string enum with values 'today', 'week', 'month' and default 'today'.inputSchema: { type: "object", properties: { date_range: { type: "string", enum: ["today", "week", "month"], description: "Rango de fechas para consultar", default: "today" } } }
- server-official.js:44-48 (helper)Static data structure providing occupancy information for different date ranges (today, week, month), used directly by the check_occupancy handler.occupancy: { today: { occupied: 12, available: 3, total: 15, rate: 80 }, week: { occupied: 78, available: 27, total: 105, rate: 74 }, month: { occupied: 310, available: 155, total: 465, rate: 67 } }