compute_kpi
Computes official microfinance KPIs—including PAR30, PAR90, and outstanding portfolio—from warehouse data using dates, periods, groupings, and filters.
Instructions
Compute an official KPI.
kpi: one of outstanding_portfolio, par30, par90, active_loans, active_clients, disbursed_amount, disbursed_loans, average_loan_size, written_off_amount, on_time_repayment_rate. as_of: date for snapshot KPIs (YYYY-MM-DD, default 2025-12-31). start, end: period for flow KPIs (YYYY-MM-DD, inclusive). group_by: dimensions among branch, governorate, region, product, segment, gender, sector, and for flow KPIs month, quarter, year. filters: dimension -> value, e.g. {"region": "South"}.
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": {
"kpi": "<kpi>"
},
"name": "compute_kpi"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | ||
| kpi | Yes | ||
| as_of | No | ||
| start | No | ||
| filters | No | ||
| group_by | No |