Skip to main content
Glama

Upsert calculation item

upsert_calculation_item
Idempotent

Add 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

NameRequiredDescriptionDefault
roleNo
notesNo
titleYes
item_idNoUpdate this position instead of adding one.
mass_kgNoPurchased parts: mass PER PIECE in kg.
categoryNoDefault personnel. Only personnel carries overhead, and travel is passed through at cost in many procedures.
grant_idNo
power_kwNoPurchased parts (category material) only: rated electrical power PER PIECE in kW. 0 = draws none; leave empty if unknown - unknown is never counted as zero.
quantityNo
cost_rateNo
sale_rateNo
tender_idNo
air_nl_minNoPurchased parts: compressed-air consumption PER PIECE while working, in Nl/min. 0 = none.
air_sourceNo
sort_orderNo
load_factorNoAlias of utilization_pct as a factor 0–1.
mass_sourceNo
start_monthNo1 = first month after the award.
personnel_idNo
power_sourceNoWhere 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_packageNoAs the concept calls it: "AP3". Groups the positions in the price sheet.
source_statusNoHow 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_idNo
duration_monthsNo
utilization_pctNoPurchased 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_installedNoAlias of power_kw.
utilization_sourceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations already declare mutation, idempotency, non-destructiveness, and closed-world behavior. The description adds important domain behavior: empty rates are allowed and become open items rather than zero, technical data values need their own sources, and the result appears as a purchased-parts table. It does not cover permissions or partial-update behavior in detail.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description front-loads the core action and then adds domain-specific rules in a dense but coherent paragraph. It is long, as warranted by the complex domain, but some rationale sentences could be tightened and the many parameter groups would benefit from clearer segmentation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 27-parameter mutation tool with no output schema and low schema coverage, the description covers the most important semantic rules and mentions the returned purchased-parts result. It remains incomplete regarding several parameters, update semantics, and the full output shape, leaving the agent to rely on annotations and schema descriptions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 44%, so the description usefully compensates for key domain parameters like `cost_rate`, `sale_rate`, `start_month`, `duration_months`, and the purchased-part technical fields. It still leaves many of the 27 parameters unexplained in the description, relying on schema text for `item_id`, aliases, `source_status`, and identifiers.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: add or change one position of the offer calculation. It distinguishes the item-level operation from the broader `upsert_offer_calculation` by focusing on a single position and explicitly referring to the parent calculation for aggregation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The item-level use case is clear, and the description points to `upsert_offer_calculation` for the aggregate calculation. However, it does not explicitly say when to use this instead of sibling operations or give exclusions such as deletion or parent-level updates.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources