workbook_reconcile
The model beside the workbook it was imported from: every node whose source cites a workbook row (the string workbook_structure hands you), or that map names, compared period by period with the row's cached values, scaled by scale where the sheet states a magnitude (1000 for a sheet in thousands). Reports the rows that agree, the ones that do not with the worst period and both figures — upstream first, with fixFirst naming the differing rows that read nothing that differs, which are the causes — the workbook's numeric rows nothing in the model cites, with its valuations (an NPV, an IRR, a multiple, a payback) named apart as valuationsNotInModel with how to write each, and the model's nodes that cite nothing. A sheet on a coarser grain than the model — an annual view of a quarterly model — is never imported and never on the check: its rows are compared as rollups, the model's own rows rolled up to the sheet's grain by each row's rollup and matched by label to the sheet the rollup reads. leaveOut declares rows you are not importing on purpose, with the reason; they come off the completeness check. The acceptance test of an import — run it after pass two, and treat every mismatch as your formula, your magnitude or your period, never as the workbook's: a calculated row that differs is a wiring error, an input that differs is a scale or a column.
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": {
"model": "<model>"
},
"name": "workbook_reconcile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | List the rows that agree as well as the ones that do not. Default false. | |
| map | No | Node → workbook row, for nodes whose source does not cite one: `{"income.revenue": "Model!Revenue"}`, `"Model!row 5"`, or a citation string; or `{row, scale}` when one row has its own magnitude. | |
| model | Yes | Model uid (`model_…`), from model_list. | |
| scale | No | What a workbook figure is multiplied by to reach the model's base unit: a number for the whole workbook, or `{"Model": 1000, "Assumptions": 1}` by sheet, for a sheet whose magnitude is written in its corner. Where you pass none for a sheet, each row's own unit text decides — a `uom` of `kUSD` is 1000, `t` or `USD/oz` is 1 — so a sheet that writes the unit beside every row wants no scale at all. Percent-formatted rows are never scaled. | |
| leaveOut | No | Rows you are deliberately not importing, each with its reason: `{"sheet": "Lambdas", "why": "helper functions with no figures"}` for a whole sheet, or `rows` by number or label for part of one. They come off `workbookRowsNotInModel` and are echoed as `leftOut`, so say them here rather than in prose: a row left out with a reason is a decision, one left out silently is work undone. A whole sheet declared out keeps its single-point outputs (an NPV, an IRR, a MOIC, a payback) on the check, echoed as `keptOnCheck`: a summary is a view, its valuation is a result. | |
| scenario | No | The scenario to evaluate. Default: the one the analyst is looking at. | |
| tolerance | No | Absolute difference allowed, in the model's units — and on a percent-formatted row, in percentage points, so the default passes a rate out by half a point and fails one out by ten. Default 0.5. | |
| attachment | No | The attachment id. May be omitted when one workbook is attached. | |
| relativeTolerance | No | Relative difference allowed. Default 0.0001. A period passes if either tolerance holds. |