Skip to main content
Glama

upsert_supplier_item

DestructiveIdempotent

Add or change a purchase price. Required: supplier_id, key, and a price as unit_price (minor units) or price_chf. Optional: name, description, unit, vat_rate, offer_item_key (links it to our own position so the margin can be read off), active, sort.

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

Input Schema

NameRequiredDescriptionDefault
keyYesUnique key of the purchase price within the supplier; existing key is updated
nameNoName of the supplier item
sortNoSort order
unitNoUnit of measure
activeNoWhether the entry is active
vat_rateNoVAT rate in percent
price_chfNoPurchase price as text in main units, e.g. '450' or "1'234.56"
unit_priceNoUnit price
descriptionNoDescription of the supplier item
supplier_idYesID of the supplier
offer_item_keyNoKey of our own price list line, to read off the margin

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 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 supplier item"
    • addedInput schema / properties / key / description
      Added value: +"Unique key of the purchase price within the supplier; existing key is updated"
    • addedInput schema / properties / name / description
      Added value: +"Name of the supplier item"
    • addedInput schema / properties / offer_item_key / description
      Added value: +"Key of our own price list line, to read off the margin"
    • addedInput schema / properties / price_chf / description
      Added value: +"Purchase 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 / supplier_id / description
      Added value: +"ID of the supplier"
    • addedInput schema / properties / unit / description
      Added value: +"Unit of measure"
    • addedInput schema / properties / unit_price / description
      Added value: +"Unit price"
    • addedInput schema / properties / vat_rate / description
      Added value: +"VAT rate in percent"
  2. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the description is not obligated to restate danger. It does add genuinely new behavioral detail: unit_price is in minor units while price_chf is main-unit text, and offer_item_key drives margin read-off. It stops short of saying whether omitted optional fields are cleared on an existing key, which matters for a destructive upsert.

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?

A single front-loaded sentence states the action, then the required fields, then the optional ones, with parenthetical rationale where it matters. The list is dense but every clause carries information; minor deduction for the run-on packing of nine optional fields.

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?

With 11 parameters and no output schema, the description covers the required set and price-unit semantics but omits what the call returns and how partial updates behave against an existing key. Given destructiveHint=true, the overwrite semantics deserve one more sentence than they get.

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 above baseline by resolving real schema ambiguity: it labels unit_price as minor units (the schema only says "Unit price") and contrasts it with price_chf in main units. It also flags a price as effectively required even though the schema lists only supplier_id and key as required.

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

Purpose4/5

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

"Add or change a purchase price" gives a specific verb pair and resource, and the optional-field list makes the scope of the write concrete. It does not distinguish itself from the similarly named upsert_offer_item, so an agent must infer the boundary from the field names alone.

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 upsert semantics are implied by "Add or change" plus the schema note that "existing key is updated," so an agent can infer that a matching key overwrites. There is no explicit when-to-use versus upsert_offer_item or list_supplier_items, and no stated prerequisites such as the supplier needing to exist.

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.