Skip to main content
Glama
trhonpavel
by trhonpavel

Update variant

update_variant
Idempotent

Modify product variant details like title, SKU, barcodes, inventory tracking, backorders, weight, and metadata. Use set_variant_price for prices.

Instructions

Updates variant fields – title, SKU, barcodes, inventory tracking, backorders, weight, metadata. For prices use set_variant_price.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
eanNo
skuNo
upcNo
titleNo
weightNoGrams
barcodeNo
metadataNoMerged into existing metadata; an empty string deletes a key
product_idYes
variant_idYes
allow_backorderNoAllow selling when out of stock
manage_inventoryNoTrack stock (default true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered structurally. The description adds the scope of mutation (which fields change) but says nothing about partial-vs-full replacement semantics, merge behavior, or validation failures; it is adequate but thin given the lower bar set by annotations.

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?

Two compact sentences with zero filler; the positive scope comes first and the routing exception second. Nothing is repeated from the title or schema.

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?

For an 11-parameter mutation tool with a nested metadata object and no output schema, the description covers the mutation scope, the key field groups, and the price exception. The notable remaining omission is whether unspecified fields are preserved, which matters for an update tool, but nothing essential for correct invocation is missing.

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 only 36%, so the description has to compensate, and it does by grouping the updatable fields (title, SKU, barcodes/ean/upc, inventory tracking/manage_inventory, backorders/allow_backorder, weight, metadata). Only the required identifiers product_id and variant_id go unnamed, which is a minor gap; the remaining semantics like grams and metadata merge are already documented in the schema.

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 (updates) and resource (variant) and enumerates the mutable field groups: title, SKU, barcodes, inventory tracking, backorders, weight, metadata. It also explicitly separates itself from the nearest sibling by stating that prices belong to set_variant_price, so an agent can route without opening schemas.

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 gives a clear exclusion rule and names the alternative tool for the price case ('For prices use set_variant_price'). It stops short of broader when-to-use context, such as preferring this over delete_variant/create_variant or noting that it is a partial update, but the routing guidance is explicit and actionable.

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