analyze_finances
Analyze current TreePod Glamping finances using key metrics from real data to assess business performance and financial health.
Instructions
Analiza las finanzas actuales de TreePod Glamping con métricas clave basado en datos reales
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | current |
Implementation Reference
- server-official.js:221-242 (handler)The main handler for the 'analyze_finances' tool. It processes input parameters (period and include_projections), retrieves financial data from treepodData, constructs a formatted analysis text including revenue, expenses, profit, occupancy, and optional projections, and returns it as tool result.case 'analyze_finances': const period = args?.period || 'monthly'; const includeProjections = args?.include_projections !== false; const data = treepodData.financial[period]; let analysisText = `📊 ANÁLISIS FINANCIERO TREEPOD GLAMPING (${period.toUpperCase()})\n\n`; analysisText += `💰 Ingresos: $${data.revenue.toLocaleString()}\n`; analysisText += `💸 Gastos: $${data.expenses.toLocaleString()}\n`; analysisText += `📈 Ganancia: $${data.profit.toLocaleString()}\n`; analysisText += `🏕️ Ocupación: ${data.occupancy}%\n`; if (includeProjections) { const projection = Math.round(data.revenue * 1.12); analysisText += `\n🔮 PROYECCIÓN:\n`; analysisText += `📊 Próximo período: $${projection.toLocaleString()}\n`; analysisText += `📈 Crecimiento estimado: 12%`; } toolResult = { content: [{ type: "text", text: analysisText }] }; break;
- server-official.js:140-155 (schema)Input schema definition for the analyze_finances tool, specifying parameters: period (enum: monthly, quarterly, yearly) and include_projections (boolean).inputSchema: { type: "object", properties: { period: { type: "string", enum: ["monthly", "quarterly", "yearly"], description: "Período de análisis", default: "monthly" }, include_projections: { type: "boolean", description: "Incluir proyecciones futuras", default: true } } }
- server-official.js:137-156 (registration)Registration of the analyze_finances tool in the tools/list response, including name, description, and input schema.{ name: "analyze_finances", description: "Analiza las finanzas actuales del negocio TreePod Glamping", inputSchema: { type: "object", properties: { period: { type: "string", enum: ["monthly", "quarterly", "yearly"], description: "Período de análisis", default: "monthly" }, include_projections: { type: "boolean", description: "Incluir proyecciones futuras", default: true } } } },
- server-official.js:34-37 (helper)Static financial data object used by the analyze_finances handler to provide monthly, quarterly, and yearly financial metrics.financial: { monthly: { revenue: 45000, expenses: 28000, profit: 17000, occupancy: 78 }, quarterly: { revenue: 135000, expenses: 84000, profit: 51000, occupancy: 75 }, yearly: { revenue: 540000, expenses: 336000, profit: 204000, occupancy: 73 }