Preview schedule
preview-scheduleGenerate a schedule from a definition without keeping it: the same generator and guards as creating one (block_type='schedule' on create-information-block), run and rolled back. Returns the envelope create would leave (its ids provisional) and the period-by-period roll-forward: the balance the schedule carries on the account it credits (a loan's: the note), opening, the period's amount, closing, and for a loan the interest, payment, principal and current portion. Show it to the person before asking to create. A definition create would refuse (a roll-forward that climbs where it should fall, legs that do not balance) is refused here with the period that breaks. warnings names any active schedule already posting the same accounts in the same months. With replaces_structure_id, replaces says what the schedule being edited or recreated has posted, by month, and the path the change takes: rebuild (the schedule regenerated in place from the new definition) while nothing has posted, terminate_and_succeed after.
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": {
"name": "<name>",
"element_ids": "<element_ids>",
"period_start": "<period_start>",
"period_end": "<period_end>",
"entry_template": "<entry_template>"
},
"name": "preview-schedule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Schedule name | |
| entity_id | No | The entity whose books the schedule belongs to, by id. Omit for the group parent. Its facts, obligations and closing entries land in that entity's books, against that entity's own accounts. | |
| period_end | Yes | Last period end | |
| element_ids | Yes | CoA element ids the schedule touches (the `id` from get-unmapped-elements, not taxonomy qnames) — typically the same debit + credit ids used in entry_template. | |
| taxonomy_id | No | Taxonomy ID (auto-creates if omitted) | |
| period_start | Yes | First period start | |
| closed_through | No | Watermark for onboarding. Facts with period_end ≤ this date are flagged 'historical' and their schedule_entry_due obligations are emitted 'voided', so the close workflow starts drafting at the first open period. Defaults to the calendar's history end: the last day of its closed_through month (calendar '2026-05' → '2026-05-31'), or the day before its first month when nothing has closed yet. An earlier date is raised to it, since an obligation there could never post; set a later one only to treat more months as already booked. | |
| entry_template | Yes | ||
| monthly_amount | No | Monthly amount in cents. Required for a straight-line schedule; a custom or loan schedule takes its amounts from its curve. | |
| schedule_metadata | No | ||
| replaces_structure_id | No | The schedule this definition would replace, when editing or recreating one: the preview then says what its posted entries mean for the change. | |
| source_transaction_id | No | Free-form reference to the originating GL transaction (e.g. an import ID, ledger entry ID, or external system key). Stored in artifact_mechanics for audit; no FK constraint. |