Skip to main content
Glama

Update variant

shop_update_variant
DestructiveIdempotent

Updates the details of a given product variant Guidance: Updates the details of a given product variant | context: product_id, variant_id

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skuNoStock Keeping Unit unique ID.
mediaNoUnique ID of the Product Media instance displayed with the variant.
priceNoVariant unit price.
stockNoVariant stock quantity. This field should contain a positive integer or the value `-1` for an infinite stock.
weightNoVariant weight (unit: kg).
positionNoPosition of the variant in the product variants list (0 is the first).
compare_atNoPrice reference for this product variant.
product_idYesUnique ID of the product.
variant_idYesUnique ID of the product variant.
option_valuesNoList of option/value pairs that identify this variant. Each item must include option_id and value, for example [{"option_id": 1, "value": "Red"}, {"option_id": 2, "value": "M"}].

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

The annotations already provide destructiveHint=true, idempotentHint=true, and openWorldHint=true. The description's 'Updates' is consistent with these hints and does not contradict them, but it adds no additional behavioral details beyond what annotations already cover.

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 description is a single, direct sentence with no redundant words. It conveys the essential purpose without any fluff or unnecessary detail.

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?

The description is minimal and does not explain what the function returns, whether it performs a partial or full update, or how it fits with the broader set of shop tools. However, given the annotations and the simplicity of an update operation, it is adequate but not rich in context.

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

Parameters3/5

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

Schema coverage is 100% and every parameter has a clear description, so the baseline applies. The tool description itself does not add extra parameter context, but the schema sufficiently explains each field, including nested option_values.

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?

The description clearly states the action ('Updates') and the resource ('product variant'), which distinguishes it from create/delete operations. The resource is specific enough that an agent can understand the tool's purpose from the description alone.

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

Usage Guidelines2/5

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

The description gives no guidance on when to use this tool versus alternatives like shop_create_variant, shop_delete_variant, or shop_update_product. It does not mention scenarios, prerequisites, or differences from similar tools, leaving the agent to infer usage from the name and parameters.

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.