Upsert calculation item
upsert_calculation_itemAdd or change one position of the offer calculation. Each position carries BOTH rates — cost_rate (what the day costs us) and sale_rate (what we charge) — so that the internal calculation and the price sheet come from one source instead of drifting apart. Both may be left empty: a position whose rate is not decided yet must be recordable, and it then shows up as «...» and is counted as an open item rather than silently entering the sum as zero euro. start_month/duration_months count from the start of the contract, not calendar dates: at bid time the award date is not fixed, and a schedule with invented dates is a promise that cannot be kept. PURCHASED PARTS (category material, quantity = pieces) can carry technical data per piece - power_kw, utilization_pct, air_nl_min, mass_kg, each with its own *_source. From them the calculation sums connected load (pieces x power, without utilization), annual energy (electric + compressed air via air_kwh_per_m3) and energy cost (energy_price_per_kwh) - see upsert_offer_calculation. The result comes back as purchased_parts and goes as a table into the price sheet and the internal calculation.
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": {
"title": "<title>"
},
"name": "upsert_calculation_item"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | ||
| notes | No | ||
| title | Yes | ||
| item_id | No | Update this position instead of adding one. | |
| mass_kg | No | Purchased parts: mass PER PIECE in kg. | |
| category | No | Default personnel. Only personnel carries overhead, and travel is passed through at cost in many procedures. | |
| grant_id | No | ||
| power_kw | No | Purchased parts (category material) only: rated electrical power PER PIECE in kW. 0 = draws none; leave empty if unknown - unknown is never counted as zero. | |
| quantity | No | ||
| cost_rate | No | ||
| sale_rate | No | ||
| tender_id | No | ||
| air_nl_min | No | Purchased parts: compressed-air consumption PER PIECE while working, in Nl/min. 0 = none. | |
| air_source | No | ||
| sort_order | No | ||
| load_factor | No | Alias of utilization_pct as a factor 0–1. | |
| mass_source | No | ||
| start_month | No | 1 = first month after the award. | |
| personnel_id | No | ||
| power_source | No | Where power_kw comes from: datasheet name/URL/page, or 'Annahme'. Each value carries its own source; a value without one is marked as an open item in the offer. | |
| work_package | No | As the concept calls it: "AP3". Groups the positions in the price sheet. | |
| source_status | No | How reliable the technical data is: datasheet of the actual type, class value of comparable units, or estimate. Empty counts as schaetzung in the offer table. | |
| calculation_id | No | ||
| duration_months | No | ||
| utilization_pct | No | Purchased parts: share of the operating hours in which the part draws power/air, 0-100. Usually an assumption - say so in utilization_source. | |
| power_kw_installed | No | Alias of power_kw. | |
| utilization_source | No |