Compute metrics
compute-metricsResolves the Derive rules scoped to a metric block (block_type='metric'), binds each rule's operands to the entity's most recent persisted report facts at period_end, evaluates, and upserts the period's standing factset_type='metric' FactSet — one per (structure, entity, period_end), so successive runs accumulate the time series and re-running a period replaces its values. Metrics with missing operands or undefined ratios are skipped with a reason, never errored.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"period_end": "2026-03-31",
"structure_id": "str_key_financial_metrics"
},
"name": "compute-metrics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity_id | No | The entity whose metrics to compute, by id. Omit for the group parent. | |
| period_end | Yes | Period end to compute at. Operands bind to report facts whose period_end matches exactly (instant balances as of this date; durations ending on it). | |
| scenario_id | No | Compute on a scenario slice: operands bind that scenario's facts (actuals as the fallback across the seam) and the standing metric set is stamped with the scenario. None (the default) computes actuals only. Pass a forecast block's structure id after compute-forecast to extend the metric series into its forward months. | |
| period_start | No | Optional lower bound for duration-operand binding and the standing FactSet's period_start. | |
| structure_id | Yes | Metric block structure (block_type='metric') to compute. |