Skip to main content
Glama
trhonpavel
by trhonpavel

Create variant

create_variant

Adds a variant, such as a new size, to an existing product; specify every product option; new option values are added automatically.

Instructions

Adds a variant to an existing product, e.g. a new size. 'options' must name every product option; new option values are added automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
eanNo
skuNo
upcNo
stockNoInitial stocked quantity at location_id (or the only location)
titleNoDefaults to the option values, e.g. 'M / Red'
pricesYes
weightNoGrams
barcodeNo
optionsNoOption title -> value, e.g. { Size: 'M', Color: 'Red' }
product_idYes
location_idNoStock location for initial stock; defaults to the only one
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

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly=false, openWorld=true, idempotent=false and destructive=false, so the safety profile is covered. The description adds genuinely new behavioral information beyond them: that 'options' must name every product option and that unknown option values are created automatically as a side effect.

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 tight sentences with zero filler; the core action comes first and the non-obvious constraint about 'options' follows immediately. Every clause carries information.

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?

For a 13-parameter creation tool with nested objects, no output schema and openWorld=true, the description covers only the options mechanic. It omits how the required 'prices' and 'stock'/'location_id' pair behave and gives no sense of the created resource, leaving notable gaps for such a wide schema.

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 54%, so roughly half the 13 parameters are undocumented by the schema. The description compensates for the most important one by explaining 'options' semantics ('must name every product option'), which the schema does not say, but says nothing about the required 'prices' array, stock/location_id interaction, or the identifier fields.

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?

The description states a specific verb and resource ('Adds a variant to an existing product') and adds a concrete example ('e.g. a new size'), so the agent knows exactly what is created. It doesn't explicitly contrast with siblings like update_variant or create_product, so sibling differentiation is only implied by 'existing product'.

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 phrase 'to an existing product' implies a prerequisite (the product must already exist), which is useful context. However, there is no explicit guidance on when to use this over create_product (new product with variants) or update_variant, and no exclusions are stated.

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