Skip to main content
Glama

Compare Calculations

compare_calculations
Read-onlyIdempotent

Compare 2 to 20 calculations by offer price. Use it to choose between designs, materials, lot sizes or costing environments. Two ids return the price and unit-cost difference between them (pair). Three or more return a ranking, cheapest first, with each option's premium over the cheapest (ranking); blocked or unpriced ones are listed last. It flags options that are different parts, or were priced on different materials, at different lot sizes, in different environments or with different overhead schemes, and never compares across currencies. Read-only and free: it re-prices nothing.

Input Schema

NameRequiredDescriptionDefault
calculation_idsYes2 to 20 distinct calculation ids: 2 for the delta, 3 to 20 for the ranking.

Output Schema

NameRequiredDescriptionDefault
pairNoSet for exactly two calculation ids.
rankingNoSet for three to twenty calculation ids.
not_foundNoThe calculation_ids that name no calculation of your organization, in the order given. A ranking leaves them out and ranks the others; a pair needs both ids, so it is refused instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / calculation_ids / items / format
      Added value: +"uuid"
    • addedOutput schema / properties / not_found
      Added value: +{
      +  "description": "The calculation_ids that name no calculation of your organization, in the order given. A ranking leaves them out and ranks the others; a pair needs both ids, so it is refused instead.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / pair / anyOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "a": {
      -        "properties": {
      -          "assembly_partial": {
      -            "default": false,
      -            "description": "True when this calculation is an assembly priced only in part: a component did not price, so unit_cost and total_cost cover the priced components only — a lower bound, not a price. It states no offer_price, is never ranked or called cheaper, and is never a quote; read its components with explain_cost.",
      -            "type": "boolean"
      -          },
      -          "calculation_id": {
      -            "type": "string"
      -          },
      -          "currency": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null,
      -            "description": "Currency this side's offer_price / unit_cost / total_cost are stated in."
      -          },
      -          "environment_changed_since_run": {
      -            "anyOf": [
      -              {
      -                "additionalProperties": true,
      -                "type": "object"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null,
      -            "description": "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."
      -          },
      -          "inputs_changed_since_run": {
      -            "anyOf": [
      -              {
      -                "additionalProperties": true,
      -                "type": "object"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null,
      -            "description": "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."
      -          },
      -          "lot_size": {
      -            "anyOf": [
      -              {
      -                "type": "integer"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null
      -          },
      -          "machine": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null
      -          },
      -          "name": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null
      -          },
      -          "needs_review": {
      -            "default": false,
      -            "description": "True when this calculation is flagged for human review — its number is not a quote yet. The reasons are on the calculation.",
      -            "type": "boolean"
      -          },
      -          "offer_price": {
      -            "anyOf": [
      -              {
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null,
      -            "description": "The headline: offer price per unit, cost-sheet surcharges included — the figure the calculation itself headlines (explain_cost's offer_price) and the one comparisons and rankings are struck on. Equal to unit_cost where the environment states no surcharges. Null until priced, and null on an assembly priced only in part (assembly_partial)."
      -          },
      -          "overhead_scheme": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null,
      -            "description": "Which overhead system unit_cost was built on: 'flat' when the cost sheet carries the flat variable overhead (overhead_var) inside unit_cost, 'ladder' when the environment states Material-/Fertigungsgemeinkosten, which switch that default off and sit above unit_cost; null when the result states neither."
      -          },
      -          "status": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null
      -          },
      -          "total_cost": {
      -            "anyOf": [
      -              {
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null,
      -            "description": "unit_cost for the whole lot, on the same basis as unit_cost."
      -          },
      -          "unit_cost": {
      -            "anyOf": [
      -              {
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null,
      -            "description": "Unit cost per part: direct cost plus overhead_var and overhead_fixed. Where the costing environment states no Material-/Fertigungsgemeinkosten, overhead_var is the flat variable overhead (platform default 15 % of direct cost); once it states them, that default is 0 and those overheads sit above unit_cost as cost-sheet rungs, with administration and selling, margin and the other surcharges. Secondary: it is not like-for-like across environments, nor across overhead schemes (see overhead_scheme)."
      -          },
      -          "unit_time_s": {
      -            "anyOf": [
      -              {
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null,
      -            "description": "Production time per unit, in seconds."
      -          }
      -        },
      -        "required": [
      -          "calculation_id"
      -        ],
      -        "type": "object"
      -      },
      -      "b": {
      -        "properties": {
      -          "assembly_partial": {
      -            "default": false,
      -            "description": "True when this calculation is an assembly priced only in part: a component did not price, so unit_cost and total_cost cover the priced components only — a lower bound, not a price. It states no offer_price, is never ranked or called cheaper, and is never a quote; read its components with explain_cost.",
      -            "type": "boolean"
      -          },
      -          "calculation_id": {
      -            "type": "string"
      -          },
      -          "currency": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null,
      -            "description": "Currency this side's offer_price / unit_cost / total_cost are stated in."
      -          },
      -          "environment_changed_since_run": {
      -            "anyOf": [
      -              {
      -                "additionalProperties": true,
      -                "type": "object"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null,
      -            "description": "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."
      -          },
      -          "inputs_changed_since_run": {
      -            "anyOf": [
      -              {
      -                "additionalProperties": true,
      -                "type": "object"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null,
      -            "description": "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."
      -          },
      -          "lot_size": {
      -            "anyOf": [
      -              {
      -                "type": "integer"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null
      -          },
      -          "machine": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null
      -          },
      -          "name": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null
      -          },
      -          "needs_review": {
      -            "default": false,
      -            "description": "True when this calculation is flagged for human review — its number is not a quote yet. The reasons are on the calculation.",
      -            "type": "boolean"
      -          },
      -          "offer_price": {
      -            "anyOf": [
      -              {
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null,
      -            "description": "The headline: offer price per unit, cost-sheet surcharges included — the figure the calculation itself headlines (explain_cost's offer_price) and the one comparisons and rankings are struck on. Equal to unit_cost where the environment states no surcharges. Null until priced, and null on an assembly priced only in part (assembly_partial)."
      -          },
      -          "overhead_scheme": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null,
      -            "description": "Which overhead system unit_cost was built on: 'flat' when the cost sheet carries the flat variable overhead (overhead_var) inside unit_cost, 'ladder' when the environment states Material-/Fertigungsgemeinkosten, which switch that default off and sit above unit_cost; null when the result states neither."
      -          },
      -          "status": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null
      -          },
      -          "total_cost": {
      -            "anyOf": [
      -              {
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null,
      -            "description": "unit_cost for the whole lot, on the same basis as unit_cost."
      -          },
      -          "unit_cost": {
      -            "anyOf": [
      -              {
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null,
      -            "description": "Unit cost per part: direct cost plus overhead_var and overhead_fixed. Where the costing environment states no Material-/Fertigungsgemeinkosten, overhead_var is the flat variable overhead (platform default 15 % of direct cost); once it states them, that default is 0 and those overheads sit above unit_cost as cost-sheet rungs, with administration and selling, margin and the other surcharges. Secondary: it is not like-for-like across environments, nor across overhead schemes (see overhead_scheme)."
      -          },
      -          "unit_time_s": {
      -            "anyOf": [
      -              {
      -                "type": "number"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "default": null,
      -            "description": "Production time per unit, in seconds."
      -          }
      -        },
      -        "required": [
      -          "calculation_id"
      -        ],
      -        "type": "object"
      -      },
      -      "comparable": {
      -        "description": "False if the two used different lot sizes, costing environments, currencies or overhead schemes, or either is an assembly priced only in part — see incomparable_reasons for which.",
      -        "type": "boolean"
      -      },
      -      "guidance": {
      -        "default": "",
      -        "description": "What the delta means and what to do next (alias of note for naming consistency with the other tools).",
      -        "type": "string"
      -      },
      -      "incomparable_reasons": {
      -        "description": "Why comparable is false: lot_size_mismatch, environment_mismatch, currency_mismatch and/or assembly_partial (the same vocabulary the REST comparison matrix uses), and cost_scheme_mismatch when one side's unit_cost carries the flat variable overhead and the other's a stated MGK/FGK ladder above it (unit_cost_delta is then null; compare at the offer price or Herstellkosten). Empty when comparable.",
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "note": {
      -        "type": "string"
      -      },
      -      "offer_price_delta": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "b − a offer price, per unit, in the shared currency — the delta that says which option is cheaper. Null when the two are quoted in different currencies — there is no FX rail, so a cross-currency difference would be an invented number — and when either side is an assembly priced only in part."
      -      },
      -      "offer_price_delta_pct": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "offer_price_delta as % of a; null wherever it is."
      -      },
      -      "unit_cost_delta": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "b − a unit cost (see CalcSide.unit_cost for what it holds), per unit, in the shared currency; null across currencies, across overhead schemes (cost_scheme_mismatch) and when either side is an assembly priced only in part. Secondary: it can point the other way from offer_price_delta when the two environments state different surcharges."
      -      },
      -      "unit_cost_delta_pct": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "unit_cost_delta as % of a; null wherever it is."
      -      },
      -      "unit_time_delta_s": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "b − a, production seconds per unit — time beside cost, so a cheaper option that is slower (capacity impact) is visible. Null when either side is an assembly priced only in part."
      -      }
      -    },
      -    "required": [
      -      "a",
      -      "b",
      -      "comparable",
      -      "note"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "a": {
      +        "properties": {
      +          "assembly_partial": {
      +            "default": false,
      +            "description": "True when this calculation is an assembly priced only in part: a component did not price, so unit_cost and total_cost cover the priced components only — a lower bound, not a price. It states no offer_price, is never ranked or called cheaper, and is never a quote; read its components with explain_cost.",
      +            "type": "boolean"
      +          },
      +          "calculation_id": {
      +            "type": "string"
      +          },
      +          "currency": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null,
      +            "description": "Currency this side's offer_price / unit_cost / total_cost are stated in."
      +          },
      +          "environment_changed_since_run": {
      +            "anyOf": [
      +              {
      +                "additionalProperties": true,
      +                "type": "object"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null,
      +            "description": "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."
      +          },
      +          "inputs_changed_since_run": {
      +            "anyOf": [
      +              {
      +                "additionalProperties": true,
      +                "type": "object"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null,
      +            "description": "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."
      +          },
      +          "lot_size": {
      +            "anyOf": [
      +              {
      +                "type": "integer"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null
      +          },
      +          "machine": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null
      +          },
      +          "name": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null
      +          },
      +          "needs_review": {
      +            "default": false,
      +            "description": "True when this calculation is flagged for human review — its number is not a quote yet. The reasons are on the calculation.",
      +            "type": "boolean"
      +          },
      +          "offer_price": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null,
      +            "description": "The headline: offer price per unit, cost-sheet surcharges included — the figure the calculation itself headlines (explain_cost's offer_price) and the one comparisons and rankings are struck on. Equal to unit_cost where the environment states no surcharges. Null until priced, and null on an assembly priced only in part (assembly_partial)."
      +          },
      +          "overhead_scheme": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null,
      +            "description": "Which overhead system unit_cost was built on: 'flat' when the cost sheet carries the flat variable overhead (overhead_var) inside unit_cost, 'ladder' when the environment states Material-/Fertigungsgemeinkosten, which switch that default off and sit above unit_cost; null when the result states neither."
      +          },
      +          "status": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null
      +          },
      +          "total_cost": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null,
      +            "description": "unit_cost for the whole lot, on the same basis as unit_cost."
      +          },
      +          "unit_cost": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null,
      +            "description": "Unit cost per part: 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. Secondary: it is not like-for-like across environments, nor across overhead schemes (see overhead_scheme)."
      +          },
      +          "unit_time_s": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null,
      +            "description": "Production time per unit, in seconds."
      +          }
      +        },
      +        "required": [
      +          "calculation_id"
      +        ],
      +        "type": "object"
      +      },
      +      "b": {
      +        "properties": {
      +          "assembly_partial": {
      +            "default": false,
      +            "description": "True when this calculation is an assembly priced only in part: a component did not price, so unit_cost and total_cost cover the priced components only — a lower bound, not a price. It states no offer_price, is never ranked or called cheaper, and is never a quote; read its components with explain_cost.",
      +            "type": "boolean"
      +          },
      +          "calculation_id": {
      +            "type": "string"
      +          },
      +          "currency": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null,
      +            "description": "Currency this side's offer_price / unit_cost / total_cost are stated in."
      +          },
      +          "environment_changed_since_run": {
      +            "anyOf": [
      +              {
      +                "additionalProperties": true,
      +                "type": "object"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null,
      +            "description": "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."
      +          },
      +          "inputs_changed_since_run": {
      +            "anyOf": [
      +              {
      +                "additionalProperties": true,
      +                "type": "object"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null,
      +            "description": "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."
      +          },
      +          "lot_size": {
      +            "anyOf": [
      +              {
      +                "type": "integer"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null
      +          },
      +          "machine": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null
      +          },
      +          "name": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null
      +          },
      +          "needs_review": {
      +            "default": false,
      +            "description": "True when this calculation is flagged for human review — its number is not a quote yet. The reasons are on the calculation.",
      +            "type": "boolean"
      +          },
      +          "offer_price": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null,
      +            "description": "The headline: offer price per unit, cost-sheet surcharges included — the figure the calculation itself headlines (explain_cost's offer_price) and the one comparisons and rankings are struck on. Equal to unit_cost where the environment states no surcharges. Null until priced, and null on an assembly priced only in part (assembly_partial)."
      +          },
      +          "overhead_scheme": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null,
      +            "description": "Which overhead system unit_cost was built on: 'flat' when the cost sheet carries the flat variable overhead (overhead_var) inside unit_cost, 'ladder' when the environment states Material-/Fertigungsgemeinkosten, which switch that default off and sit above unit_cost; null when the result states neither."
      +          },
      +          "status": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null
      +          },
      +          "total_cost": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null,
      +            "description": "unit_cost for the whole lot, on the same basis as unit_cost."
      +          },
      +          "unit_cost": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null,
      +            "description": "Unit cost per part: 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. Secondary: it is not like-for-like across environments, nor across overhead schemes (see overhead_scheme)."
      +          },
      +          "unit_time_s": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "default": null,
      +            "description": "Production time per unit, in seconds."
      +          }
      +        },
      +        "required": [
      +          "calculation_id"
      +        ],
      +        "type": "object"
      +      },
      +      "comparable": {
      +        "description": "False if the two are different parts, were priced on different materials, used different lot sizes, costing environments, currencies or overhead schemes, or either is an assembly priced only in part — see incomparable_reasons for which.",
      +        "type": "boolean"
      +      },
      +      "guidance": {
      +        "default": "",
      +        "description": "What the delta means and what to do next (alias of note for naming consistency with the other tools).",
      +        "type": "string"
      +      },
      +      "incomparable_reasons": {
      +        "description": "Why comparable is false: lot_size_mismatch, environment_mismatch, currency_mismatch and/or assembly_partial (the same vocabulary the REST comparison matrix uses); cost_scheme_mismatch when one side's unit_cost carries the flat variable overhead and the other's a stated MGK/FGK ladder above it (unit_cost_delta is then null; compare at the offer price or Herstellkosten); material_mismatch when they were priced on different materials (two grades, or a grade and the environment's default material); and different_part when they price two different parts (two revisions of one part are one part). Empty when comparable.",
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "note": {
      +        "type": "string"
      +      },
      +      "offer_price_delta": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "b − a offer price, per unit, in the shared currency — the delta that says which option is cheaper. Null when the two are quoted in different currencies — there is no FX rail, so a cross-currency difference would be an invented number — and when either side is an assembly priced only in part."
      +      },
      +      "offer_price_delta_pct": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "offer_price_delta as % of a; null wherever it is."
      +      },
      +      "unit_cost_delta": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "b − a unit cost (see CalcSide.unit_cost for what it holds), per unit, in the shared currency; null across currencies, across overhead schemes (cost_scheme_mismatch) and when either side is an assembly priced only in part. Secondary: it can point the other way from offer_price_delta when the two environments state different surcharges."
      +      },
      +      "unit_cost_delta_pct": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "unit_cost_delta as % of a; null wherever it is."
      +      },
      +      "unit_time_delta_s": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "b − a, production seconds per unit — time beside cost, so a cheaper option that is slower (capacity impact) is visible. Null when either side is an assembly priced only in part."
      +      }
      +    },
      +    "required": [
      +      "a",
      +      "b",
      +      "comparable",
      +      "note"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / ranking / anyOf
      Previous value: -[
      -  {
      -    "description": "N calculations ranked by offer price, lowest first, with time beside\ncost — what ``compare_calculations`` answers for 3 to 20 ids.",
      -    "properties": {
      -      "best_calculation_id": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "The cheapest priced option's id (the ranking winner), or null if none are priced yet."
      -      },
      -      "comparable": {
      -        "description": "True only when there are at least two priced options AND they share a lot size, costing environment, overhead scheme and currency. False either because the options are not like-with-like (the spread is then not purely the part) or because fewer than two are priced and there is nothing to compare — read `note` / `incomparable_reasons` for which.",
      -        "type": "boolean"
      -      },
      -      "guidance": {
      -        "default": "",
      -        "description": "What the ranking means and what to do next.",
      -        "type": "string"
      -      },
      -      "incomparable_reasons": {
      -        "description": "Why comparable is false: lot_size_mismatch, environment_mismatch, cost_scheme_mismatch (the flat variable overhead vs a stated MGK/FGK ladder: unit-cost deltas are then null) and/or currency_mismatch. On currency_mismatch the options are NOT ranked at all (no rank, no deltas, no winner): there is no FX rail, so a cross-currency order would be invented.",
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "note": {
      -        "type": "string"
      -      },
      -      "priced_count": {
      -        "description": "How many of the inputs carry a price.",
      -        "type": "integer"
      -      },
      -      "ranked": {
      -        "description": "Priced options by offer price, lowest first (rank 1…k), then any blocked / unpriced calcs and any assembly priced only in part (rank null) in the order given.",
      -        "items": {
      -          "description": "One calculation's place in an N-way ranking (lowest offer price first).",
      -          "properties": {
      -            "assembly_partial": {
      -              "default": false,
      -              "description": "True when this calculation is an assembly priced only in part: a component did not price, so unit_cost and total_cost cover the priced components only — a lower bound, not a price. It states no offer_price, is never ranked or called cheaper, and is never a quote; read its components with explain_cost.",
      -              "type": "boolean"
      -            },
      -            "calculation_id": {
      -              "type": "string"
      -            },
      -            "currency": {
      -              "anyOf": [
      -                {
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "default": null,
      -              "description": "Currency this side's offer_price / unit_cost / total_cost are stated in."
      -            },
      -            "environment_changed_since_run": {
      -              "anyOf": [
      -                {
      -                  "additionalProperties": true,
      -                  "type": "object"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "default": null,
      -              "description": "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."
      -            },
      -            "inputs_changed_since_run": {
      -              "anyOf": [
      -                {
      -                  "additionalProperties": true,
      -                  "type": "object"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "default": null,
      -              "description": "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."
      -            },
      -            "lot_size": {
      -              "anyOf": [
      -                {
      -                  "type": "integer"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "default": null
      -            },
      -            "machine": {
      -              "anyOf": [
      -                {
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "default": null
      -            },
      -            "name": {
      -              "anyOf": [
      -                {
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "default": null
      -            },
      -            "needs_review": {
      -              "default": false,
      -              "description": "True when this calculation is flagged for human review — its number is not a quote yet. The reasons are on the calculation.",
      -              "type": "boolean"
      -            },
      -            "offer_price": {
      -              "anyOf": [
      -                {
      -                  "type": "number"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "default": null,
      -              "description": "The headline: offer price per unit, cost-sheet surcharges included — the figure the calculation itself headlines (explain_cost's offer_price) and the one comparisons and rankings are struck on. Equal to unit_cost where the environment states no surcharges. Null until priced, and null on an assembly priced only in part (assembly_partial)."
      -            },
      -            "offer_price_delta_vs_best": {
      -              "anyOf": [
      -                {
      -                  "type": "number"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "default": null,
      -              "description": "Offer-price premium per unit over the winner (0 for the winner)."
      -            },
      -            "offer_price_delta_vs_best_pct": {
      -              "anyOf": [
      -                {
      -                  "type": "number"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "default": null,
      -              "description": "Premium as % of the winner's offer price."
      -            },
      -            "overhead_scheme": {
      -              "anyOf": [
      -                {
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "default": null,
      -              "description": "Which overhead system unit_cost was built on: 'flat' when the cost sheet carries the flat variable overhead (overhead_var) inside unit_cost, 'ladder' when the environment states Material-/Fertigungsgemeinkosten, which switch that default off and sit above unit_cost; null when the result states neither."
      -            },
      -            "rank": {
      -              "anyOf": [
      -                {
      -                  "type": "integer"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "default": null,
      -              "description": "1 = the priced option with the lowest offer_price. Null for a calc with no price yet (blocked / not succeeded) and for an assembly priced only in part (assembly_partial); those sort to the end."
      -            },
      -            "status": {
      -              "anyOf": [
      -                {
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "default": null
      -            },
      -            "total_cost": {
      -              "anyOf": [
      -                {
      -                  "type": "number"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "default": null,
      -              "description": "unit_cost for the whole lot, on the same basis as unit_cost."
      -            },
      -            "unit_cost": {
      -              "anyOf": [
      -                {
      -                  "type": "number"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "default": null,
      -              "description": "Unit cost per part: direct cost plus overhead_var and overhead_fixed. Where the costing environment states no Material-/Fertigungsgemeinkosten, overhead_var is the flat variable overhead (platform default 15 % of direct cost); once it states them, that default is 0 and those overheads sit above unit_cost as cost-sheet rungs, with administration and selling, margin and the other surcharges. Secondary: it is not like-for-like across environments, nor across overhead schemes (see overhead_scheme)."
      -            },
      -            "unit_cost_delta_vs_best": {
      -              "anyOf": [
      -                {
      -                  "type": "number"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "default": null,
      -              "description": "This option's unit cost minus the winner's (the winner is the lowest offer price). Negative when this option costs less to make but more to buy: its environment states larger cost-sheet surcharges than the winner's. Null when the options use different overhead schemes (cost_scheme_mismatch)."
      -            },
      -            "unit_cost_delta_vs_best_pct": {
      -              "anyOf": [
      -                {
      -                  "type": "number"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "default": null,
      -              "description": "unit_cost_delta_vs_best as % of the winner's unit cost."
      -            },
      -            "unit_time_delta_vs_best_s": {
      -              "anyOf": [
      -                {
      -                  "type": "number"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "default": null,
      -              "description": "Production seconds/unit vs the cheapest option — so a cheaper winner that is slower (capacity impact) stays visible."
      -            },
      -            "unit_time_s": {
      -              "anyOf": [
      -                {
      -                  "type": "number"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "default": null,
      -              "description": "Production time per unit, in seconds."
      -            }
      -          },
      -          "required": [
      -            "calculation_id"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "total_count": {
      -        "description": "How many distinct calculations were ranked.",
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "ranked",
      -      "priced_count",
      -      "total_count",
      -      "comparable",
      -      "note"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "N calculations ranked by offer price, lowest first, with time beside\ncost — what ``compare_calculations`` answers for 3 to 20 ids.",
      +    "properties": {
      +      "best_calculation_id": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The cheapest priced option's id (the ranking winner), or null if none are priced yet."
      +      },
      +      "comparable": {
      +        "description": "True only when there are at least two priced options AND they are one part, priced on one material, and share a lot size, costing environment, overhead scheme and currency. False either because the options are not like-with-like (incomparable_reasons names what differs) or because fewer than two are priced and there is nothing to compare — read `note` / `incomparable_reasons` for which.",
      +        "type": "boolean"
      +      },
      +      "guidance": {
      +        "default": "",
      +        "description": "What the ranking means and what to do next.",
      +        "type": "string"
      +      },
      +      "incomparable_reasons": {
      +        "description": "Why comparable is false: lot_size_mismatch, environment_mismatch, cost_scheme_mismatch (the flat variable overhead vs a stated MGK/FGK ladder: unit-cost deltas are then null), currency_mismatch, material_mismatch (priced on different materials: two grades, or a grade and the environment's default material) and/or different_part (not all one part; two revisions of one part are one part). On currency_mismatch the options are NOT ranked at all (no rank, no deltas, no winner): there is no FX rail, so a cross-currency order would be invented.",
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "note": {
      +        "type": "string"
      +      },
      +      "priced_count": {
      +        "description": "How many of the inputs carry a price.",
      +        "type": "integer"
      +      },
      +      "ranked": {
      +        "description": "Priced options by offer price, lowest first (rank 1…k), then any blocked / unpriced calcs and any assembly priced only in part (rank null) in the order given.",
      +        "items": {
      +          "description": "One calculation's place in an N-way ranking (lowest offer price first).",
      +          "properties": {
      +            "assembly_partial": {
      +              "default": false,
      +              "description": "True when this calculation is an assembly priced only in part: a component did not price, so unit_cost and total_cost cover the priced components only — a lower bound, not a price. It states no offer_price, is never ranked or called cheaper, and is never a quote; read its components with explain_cost.",
      +              "type": "boolean"
      +            },
      +            "calculation_id": {
      +              "type": "string"
      +            },
      +            "currency": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null,
      +              "description": "Currency this side's offer_price / unit_cost / total_cost are stated in."
      +            },
      +            "environment_changed_since_run": {
      +              "anyOf": [
      +                {
      +                  "additionalProperties": true,
      +                  "type": "object"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null,
      +              "description": "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."
      +            },
      +            "inputs_changed_since_run": {
      +              "anyOf": [
      +                {
      +                  "additionalProperties": true,
      +                  "type": "object"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null,
      +              "description": "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."
      +            },
      +            "lot_size": {
      +              "anyOf": [
      +                {
      +                  "type": "integer"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null
      +            },
      +            "machine": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null
      +            },
      +            "name": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null
      +            },
      +            "needs_review": {
      +              "default": false,
      +              "description": "True when this calculation is flagged for human review — its number is not a quote yet. The reasons are on the calculation.",
      +              "type": "boolean"
      +            },
      +            "offer_price": {
      +              "anyOf": [
      +                {
      +                  "type": "number"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null,
      +              "description": "The headline: offer price per unit, cost-sheet surcharges included — the figure the calculation itself headlines (explain_cost's offer_price) and the one comparisons and rankings are struck on. Equal to unit_cost where the environment states no surcharges. Null until priced, and null on an assembly priced only in part (assembly_partial)."
      +            },
      +            "offer_price_delta_vs_best": {
      +              "anyOf": [
      +                {
      +                  "type": "number"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null,
      +              "description": "Offer-price premium per unit over the winner (0 for the winner)."
      +            },
      +            "offer_price_delta_vs_best_pct": {
      +              "anyOf": [
      +                {
      +                  "type": "number"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null,
      +              "description": "Premium as % of the winner's offer price."
      +            },
      +            "overhead_scheme": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null,
      +              "description": "Which overhead system unit_cost was built on: 'flat' when the cost sheet carries the flat variable overhead (overhead_var) inside unit_cost, 'ladder' when the environment states Material-/Fertigungsgemeinkosten, which switch that default off and sit above unit_cost; null when the result states neither."
      +            },
      +            "rank": {
      +              "anyOf": [
      +                {
      +                  "type": "integer"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null,
      +              "description": "1 = the priced option with the lowest offer_price. Null for a calc with no price yet (blocked / not succeeded) and for an assembly priced only in part (assembly_partial); those sort to the end."
      +            },
      +            "status": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null
      +            },
      +            "total_cost": {
      +              "anyOf": [
      +                {
      +                  "type": "number"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null,
      +              "description": "unit_cost for the whole lot, on the same basis as unit_cost."
      +            },
      +            "unit_cost": {
      +              "anyOf": [
      +                {
      +                  "type": "number"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null,
      +              "description": "Unit cost per part: 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. Secondary: it is not like-for-like across environments, nor across overhead schemes (see overhead_scheme)."
      +            },
      +            "unit_cost_delta_vs_best": {
      +              "anyOf": [
      +                {
      +                  "type": "number"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null,
      +              "description": "This option's unit cost minus the winner's (the winner is the lowest offer price). Negative when this option costs less to make but more to buy: its environment states larger cost-sheet surcharges than the winner's. Null when the options use different overhead schemes (cost_scheme_mismatch)."
      +            },
      +            "unit_cost_delta_vs_best_pct": {
      +              "anyOf": [
      +                {
      +                  "type": "number"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null,
      +              "description": "unit_cost_delta_vs_best as % of the winner's unit cost."
      +            },
      +            "unit_time_delta_vs_best_s": {
      +              "anyOf": [
      +                {
      +                  "type": "number"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null,
      +              "description": "Production seconds/unit vs the cheapest option — so a cheaper winner that is slower (capacity impact) stays visible."
      +            },
      +            "unit_time_s": {
      +              "anyOf": [
      +                {
      +                  "type": "number"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "default": null,
      +              "description": "Production time per unit, in seconds."
      +            }
      +          },
      +          "required": [
      +            "calculation_id"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "total_count": {
      +        "description": "How many distinct calculations were ranked.",
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "ranked",
      +      "priced_count",
      +      "total_count",
      +      "comparable",
      +      "note"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Added

TDQS

A4.5/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: cardinality-dependent output modes (pair delta vs ranking with premium over cheapest), placement of blocked/unpriced entries last, cross-option difference flags (different parts, materials, lot sizes, environments, overhead schemes), and a hard constraint that it never compares across currencies. It also confirms 're-prices nothing' and is free, consistent with readOnlyHint/idempotentHint.

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

Conciseness5/5

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

Front-loaded with the action and scope, then usage, then output behavior by cardinality, then constraints  every sentence carries distinct information with no filler or restatement of the name/title.

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

Completeness5/5

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

With only one parameter, full schema coverage, an existing output schema, and clear annotations, the description covers the remaining gaps an agent needs: input cardinality rules, the two result shapes, edge-case ordering, comparability caveats, and cost/side-effect profile.

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 100% and the schema already states the 2-for-delta / 3-to-20-for-ranking split. The description's extra detail (price and unit-cost difference, cheapest-first ranking) describes output semantics rather than adding new meaning about the parameter itself, so the baseline 3 applies.

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?

States a specific verb (compare) and resource (calculations) with an explicit ceiling/floor of 2-20 and the comparison basis (offer price). It is immediately distinguishable from read-oriented siblings like get_calculation and get_cost_breakdown, which return one calculation rather than a multi-option comparison.

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

Usage Guidelines4/5

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

Explicitly names the decision contexts that call for it: choosing between designs, materials, lot sizes or costing environments. It does not name an alternative tool or state when not to use this (e.g., single-calculation lookups), so it falls short of full routing guidance.

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.