get_budget_vs_actual
Budget (Soll) vs actual (Ist) with variance and YTD summary. Requires plan_id from list_budget_plans. detail=summary omits period_rows and row_count (use it for KPI-only questions). Besides the per-category rows (period_rows, ytd_summary) the response carries derived P&L metrics for plan AND actual: metrics (per period) and metrics_ytd (all periods of the response) with revenue, other_income, cogs, opex, depreciation, financial, tax, gross_margin, ebitda, ebit, ebt and net_income (= Jahresueberschuss), each with budget, actual, variance and variance_pct. They are computed from tenant_config.pnl_labels exactly like get_periodic_summaries.metrics — do NOT sum categories yourself. unmapped_categories lists categories with amounts but no subtotal_group (not part of any metric). With cost_center set, actuals of the metrics are tenant-wide (see metrics_note). Account level (granularity=account): one row per account/sub-account of the plan, key "8400" (the main account = sub-account 000, compared against the actuals of the main account only) or "8400/130" (a specific sub-account, compared against that sub-account only) — the two never overlap and are not summed.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"plan_id": "<plan_id>"
},
"name": "get_budget_vs_actual"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| detail | No | rows (default) = full period_rows + row_count; summary = only ytd_summary, metrics, metrics_ytd and unmapped_categories (small answer for KPI-only questions). | |
| date_to | No | End date YYYY-MM-DD or YYYY-MM. Omit for full plan range. | |
| plan_id | Yes | UUID of the budget plan (from list_budget_plans) | |
| date_from | No | Start date YYYY-MM-DD or YYYY-MM. Omit for full plan range. | |
| cost_center | No | Optional cost center filter. | |
| granularity | No | Breakdown level (default: category) |