Skip to main content
Glama

upsert_offer_item

DestructiveIdempotent

Add or change a line in the price list. Required: key, name, and a price: unit_price in MAIN units (450 = 450.00 — NOT cents), or unit_price_minor in cents/rappen, or price_chf ('450' / "1'234.56"). Optional: description, unit (default 'Stk'), vat_rate (default: the seller country's standard rate), is_standard (proposed on every new quote), active, sort. An existing key is updated, not duplicated.

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": {
      "key": "<key>",
      "name": "<name>"
    },
    "name": "upsert_offer_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesUnique key of the price list line; an existing key is updated
nameYesName of the offer item
sortNoSort order
unitNoUnit of measure
activeNoWhether the entry is active
vat_rateNoVAT rate in percent
price_chfNoPrice as text in main units, e.g. '450' or "1'234.56"
unit_priceNoMAIN units: 450 = 450.00
descriptionNoDescription of the offer item
is_standardNotrue proposes this line on every new quote
unit_price_minorNoCents/rappen, instead of unit_price.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • addedInput schema / properties / active / description
      Added value: +"Whether the entry is active"
    • addedInput schema / properties / description / description
      Added value: +"Description of the offer item"
    • addedInput schema / properties / is_standard / description
      Added value: +"true proposes this line on every new quote"
    • addedInput schema / properties / key / description
      Added value: +"Unique key of the price list line; an existing key is updated"
    • addedInput schema / properties / name / description
      Added value: +"Name of the offer item"
    • addedInput schema / properties / price_chf / description
      Added value: +"Price as text in main units, e.g. '450' or \"1'234.56\""
    • addedInput schema / properties / sort / description
      Added value: +"Sort order"
    • addedInput schema / properties / unit / description
      Added value: +"Unit of measure"
    • addedInput schema / properties / vat_rate / description
      Added value: +"VAT rate in percent"
  2. First observed

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true and idempotentHint=true; the description adds real value by explaining the overwrite-by-key model and defaulting behaviour (vat_rate falls back to the seller country's standard rate, unit defaults to 'Stk', is_standard is proposed on new quotes). However, it never addresses the destructiveHint it carries - whether omitted optional fields are preserved or wiped on update - so the most consequential behaviour of a destructive upsert goes undisclosed.

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?

The purpose is front-loaded in the opening clause, followed by required inputs, price variants, then optionals with defaults, and the upsert caveat last. Every clause carries information an agent needs to call the tool correctly; there is no filler.

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 an 11-parameter destructive upsert with no output schema, the description covers inputs and defaults well but leaves two gaps an agent would care about: what happens to optional fields omitted on an update, and any permission or side-effect prerequisites. The absence of an output schema is acceptable since the return value needn't be described at this level.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description earns credit for stating the one-of constraint across unit_price, unit_price_minor and price_chf, which the flat schema cannot express. It also clarifies that unit_price is in main units while unit_price_minor is cents/rappen, reinforcing the schema's most error-prone distinction.

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?

"Add or change a line in the price list" names a concrete verb and a specific resource, and the closing clause ("An existing key is updated, not duplicated") pins down the upsert semantics so an agent can distinguish it from a plain create or update call. The resource (price-list line) also separates it from the neighbouring upsert_supplier_item family.

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?

The description makes the selection condition clear: choose this when you want create-or-update behaviour rather than a separate create/update pair, and it lists the three alternative price representations so the agent knows which to pick. It does not name an alternative tool or state when not to use it, so it stops 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.