Skip to main content
Glama
@cmssy/mcp-server

@cmssy/mcp-server

Official

Set product variants

set_product_variants
Destructive

Define or replace a product's full variant set, including selections, SKU, price, stock, and volume tiers; omitted variants are deleted.

Instructions

Define a product's variants. Each variant is one combination of values for the model's variantAxes (set those with update_model) and carries its own price, stock, SKU and volume breaks. The call replaces the whole set, so send every variant the product keeps - a variant left out is deleted. Every field but tiers and currencyPrices is written as sent (those two are kept when omitted), so copy sku and stock (onHand) from list_products for each variant you keep; both are required, null for none. Stock already reserved by carts stays with the variant that keeps its selection. Prices are minor units: price and tiers in the default currency, currencyPrices in each additional currency (omitted = kept, like tiers). To change only prices per currency use set_product_currency_prices variants instead - it never touches stock or SKU.

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": {
      "recordId": "<recordId>",
      "variants": "<variants>"
    },
    "name": "set_product_variants"
  }
}

Input Schema

NameRequiredDescriptionDefault
recordIdYesProduct record id
variantsYesThe product's whole variant set, at most 500. It replaces what is stored; [] removes every variant.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.73.2

TDQS

A5/5.0
Behavior5/5

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

Annotations flag destructive=true, and the description substantiates exactly what is destroyed: omitted variants are deleted and every field except tiers and currencyPrices is written as sent, so an omitted sku/stock is overwritten rather than preserved. It adds behavior annotations cannot express — cart-reserved stock stays with the variant keeping its selection, and [] vs omission have different effects.

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?

Purpose and the replace-all warning come first, followed by field semantics and then the alternative tool — a deliberate order for a destructive call. Despite its length, each sentence carries distinct operational information; no restatement of the title, schema, or annotations.

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?

For a destructive, whole-set-replacing call with up to 500 nested variants and no output schema, the description covers replacement scope, field overwrite rules, fallback behavior for tiers/currencyPrices, stock reservation, and currency semantics. Nothing an agent needs before calling it destructively is missing.

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

Parameters5/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 adds semantics the schema lacks: the keep-on-omit contract for tiers and currencyPrices, the requirement to copy sku and onHand from list_products ('null for none'), and the cross-tool note on where an empty tiers array falls back to. It also reinforces minor-units pricing, which is where miscalls are most costly.

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 and resource ('Define a product's variants') and immediately bounds the operation's scope: it replaces the whole set rather than patching one variant. It also distinguishes itself from the closest sibling by noting that set_product_currency_prices never touches stock or SKU, so an agent can pick between them without opening a schema.

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

Usage Guidelines5/5

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

Provides explicit routing: use set_product_variants for the full variant set, set_product_currency_prices 'to change only prices per currency', update_model to set variantAxes, and list_products as the source for sku/stock. It also states the negative condition — a variant left out is deleted — which is the key when-not-to-casually-call signal.

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

Deploy Server

Other Tools