Skip to main content
Glama

update_commerce_variant

Destructive

Update one variant. Sibling variants are untouched.

option_values cannot be changed — delete the variant and add the new combination instead.

Args: project_id: The project ID. product_id: The product ID. variant_id: The variant ID (from list_commerce_variants). sku: New SKU. price_amount: New price in the smallest currency unit. Leave -1 to keep current. compare_at_amount: New struck-through price. Leave -1 to keep current. currency: New ISO currency code. image_url: New variant image URL. weight_grams: New shipping weight in grams. Leave -1 to keep current. inventory_policy: deny or continue. inventory_quantity: New stock level. Leave -1 to keep current.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skuNo
currencyNo
image_urlNo
product_idYes
project_idYes
variant_idYes
price_amountNo
weight_gramsNo
inventory_policyNo
compare_at_amountNo
inventory_quantityNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

With destructiveHint=true already declared, the description adds genuinely useful context: the mutation is scoped to a single variant with siblings untouched, option_values are immutable, and -1 acts as a keep-current sentinel for numeric fields. These go beyond the annotations, though it says nothing about permissions or reversibility.

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?

Front-loads the purpose and the key constraint before the parameter list, so the most decision-relevant content comes first. The Args enumeration is long but justified at 0% schema coverage; there is little waste.

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

Completeness4/5

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

An output schema exists, so return values need no explanation, and all input parameters are covered. The immutability of option_values and the sentinel semantics make partial-update behavior clear; only auth/error behavior is absent, which is minor for this class of tool.

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 description coverage is 0%, so the description carries the full burden, and its Args block documents all 11 parameters — including field meanings, the -1 keep-current convention, and the deny/continue values for inventory_policy. Compensation is strong; only a few ID fields remain terse ("The project ID"), which is inherent.

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?

States a specific verb and resource ("Update one variant") plus a scope constraint ("Sibling variants are untouched"), which clarifies it targets a single variant rather than the parent product. It does not, however, distinguish itself from overlapping siblings like update_commerce_price and update_commerce_inventory, so an agent cannot fully route between them from the text alone.

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?

Provides a concrete alternative for a specific case: "option_values cannot be changed — delete the variant and add the new combination instead," naming both the condition and the substitute tool. It also gives per-field guidance ("Leave -1 to keep current") that tells the agent how to signal a no-op. It lacks general when-to-use guidance versus the price/inventory siblings.

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