Get Cost Breakdown
get_cost_breakdownGet the itemised cost sheet of a calculation as one tree: headline, cost category, operation and feature, with time and cost side by side. Use it when someone needs the line items, for a negotiation, a work plan or a design review. Each line carries its time, its rate and the factor keys that move it, which preview_cost accepts. persona selects the tiers and quantity restates the headline, times and cost tier at another lot size. max_depth sets how deep the cost sheet goes (default 2, the categories and one tier beneath; null for the whole tree), and a line cut short says in children_hidden how many lines it hides. Also returns the stock the part is bought as, with its scrap and remnant credits. For a short summary, use explain_cost. Read-only and free.
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": {
"calculation_id": "<calculation_id>"
},
"name": "get_cost_breakdown"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| persona | No | Which tiers to return: 'full' (the default, every tier), 'procurement' (headline and band), 'workprep' (the operations as a work plan), 'operations' (operations and machines) or 'design' (the cost sheet and feature drivers). | full |
| quantity | No | Lot size to read the headline, the times and the cost tier at; omit for the lot the calculation was priced for. The operations, feature and material_stock tiers describe the priced lot either way. | |
| max_depth | No | How many tiers of cost_lines to return: 1 the cost categories only, 2 (the default) the categories and the tier beneath, null the whole tree. A line cut short states in children_hidden how many lines sit beneath it. With a depth set, a line also leaves out the keys it has no value for (null, [] or {}). | |
| calculation_id | Yes | Id of a calculation, as upload_and_quote, quote_part or list_calculations return it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| basis | No | Where the figures at `quantity` come from: 'priced' (the ordered lot, exact), 'curve_point' (recorded on the calculation's lot-size curve while pricing) or 'restated' (priced from the same closed form the curve was built from). Null when the calculation records no lot-size curve. | |
| error | No | Why this calculation produced no price, in one sentence, when its status is terminal (failed / cancelled). | |
| status | Yes | ||
| persona | Yes | The persona view this result is sliced for. | |
| currency | No | The calculation's currency; every money figure here is in it. | |
| features | No | ||
| guidance | Yes | ||
| machines | No | ||
| quantity | No | The lot size this result is stated at: the calculation's own ordered lot unless `quantity` was passed, in which case the headline, the times and the cost tier are all at that lot size. | |
| cost_band | No | [low, high] prediction band for the unit cost. Stated at the lot the calculation was priced at only: the band is fitted to that run and does not carry to another quantity. | |
| unit_cost | No | Unit cost per part at `quantity`: direct cost plus overhead_var and overhead_fixed. Where the costing environment states no Material-/Fertigungsgemeinkosten, overhead_var is the flat variable overhead the environment states (none by default); once it states them, those overheads sit above unit_cost as cost-sheet rungs, with administration and selling, margin and the other surcharges. The price to quote is offer_price. | |
| confidence | No | Quote-trust signal — the headline the procurement / supplier persona reads together with the prediction band. | |
| cost_lines | No | The itemised cost sheet as a tree — every category with the tiers beneath it, each carrying its time, its rate and the factors that move it. | |
| operations | No | ||
| setup_cost | No | Setup cost for the whole lot at `quantity`, in `currency` — the sheet's setup line times the lot. | |
| total_cost | No | unit_cost for the whole lot at `quantity`, on the same basis as unit_cost. | |
| offer_price | No | The offer price per unit — unit_cost plus the cost-sheet surcharges the costing environment states; equal to unit_cost when no sheet is stated. The SAME figure explain_cost states, so the shareable procurement headline is the price, not the bare manufacturing cost. Absent on older calculations. | |
| unit_time_s | No | Time per unit at `quantity`, in seconds, across every activity: machine time plus the bench work plus the per-part programming and inspection shares. One meaning at every lot size, and never smaller than `machine_time_s`. Null at a lot size a calculation priced before the two were told apart. | |
| needs_review | No | True when this cost needs a human check before it is trusted. Reported for EVERY persona — a trust flag must never be sliced away, or a persona that doesn't get the review tier reads a flagged cost as clean. | |
| setup_time_s | No | Setup time for the whole lot at `quantity`, in seconds. | |
| material_note | No | ||
| calculation_id | Yes | ||
| machine_time_s | No | Machine time per unit at `quantity`, in seconds: the billable run plus the finishing pass under the allowance. | |
| material_stock | No | The stock the part is bought as — format, size, parts per stock — its mass balance, and the material line's purchase and credits, at the lot the calculation was priced for whichever quantity was asked. Null on a catalogue part and on a calculation priced before 2026-08-28, which recorded no material detail; one priced before the 2026-09-26 release states no scrap or remnant mass and no bar length. | |
| cost_categories | No | Per-unit cost by category, keyed by the cost sheet's own bucket slugs (material, setup, machine, labour, programming, tooling, inspection, finishing, subcontract, then the surcharge ladder). The top level of ``cost_lines`` flattened: same numbers, in the calculation's currency, adding up to the price per part. | |
| currency_factor | No | What every money figure here was multiplied by to carry it from the environment's rate currency into `currency`; 1.0 when the two are the same. The prices and per-lot charges in a cost line's `label_params` are in the rate currency, so a line's amount is that arithmetic (mass x price per kilogram, time x rate) times this factor — and times the calibration it was charged at on a calibrated environment. Absent where the calculation does not state it. | |
| machine_name_at_n | No | The machine the figures at `quantity` were priced on, where it differs from or restates the calculation's own route. | |
| material_resolved | No | ||
| selection_failure | No | The same refusal as data when no machine in the costing environment could make the part. | |
| cost_sheet_rebuilt | No | True when the sheet was reconstructed from the rates, times and cost lines this calculation stored rather than recorded while it was priced. A reconstructed sheet carries the cost categories and the surcharge ladder but not the per-machine, per-clamping or per-operation tiers — those are recorded only while pricing and cannot be derived afterwards. Every amount is the amount charged either way. Null when no sheet was read for this persona. | |
| costing_environment_id | No | The costing environment this was priced in: the machines, rates and overheads the factors named in each line's ``factors`` belong to. | |
| inputs_changed_since_run | No | Null when this price reflects every input on its part revision. Otherwise {roles, corrections, latest_at}: files attached and corrections applied to the part after the run read its inputs, which a new calculation reads and this one did not. | |
| environment_changed_since_run | No | Null when this price was computed on its costing environment as it stands. Otherwise {latest_at}: the environment was edited after the run read it, and a new calculation prices with the current setup while this result does not. |