Skip to main content
Glama
camerone05

shopify-admin-mcp-server

by camerone05

Create Product Variants

shopify_create_variants

Add new variants to an existing Shopify product by supplying option values that match its options, and optionally remove the standalone default variant.

Instructions

Add new variants to an existing product.

Each variant must supply optionValues matching the product's options — e.g. for a product with options Size and Colour: optionValues: [{ optionName: "Size", name: "M" }, { optionName: "Colour", name: "Black" }]. Read the product's options first with shopify_get_product_by_id.

strategy REMOVE_STANDALONE_VARIANT deletes the auto-created default variant — use it when adding the first real variants to a product that was created without options.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
strategyNoDEFAULT
variantsYes
productIdYesProduct GID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.0.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations cover the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=true). The description adds real behavior beyond them: the REMOVE_STANDALONE_VARIANT strategy deletes the auto-created default variant, which is a conditional destructive side effect not reflected in destructiveHint. Minor tension, but it is a mode-specific delete, not a contradiction of the tool's declared behavior.

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?

Three short, front-loaded paragraphs: purpose, the tricky optionValues contract with an example, then the strategy caveat. No filler; every sentence carries information an agent needs before calling.

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 a mutation tool with no output schema and 33% schema coverage, the definition covers the two error-prone areas (optionValues matching, standalone-variant removal). It omits permissions requirements, whether new variants land on inventory locations, and the response shape, which are modest gaps.

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 33%, so the description must compensate — and it does, explaining that optionValues must match the product's existing options with a concrete example and clarifying the semantics of the strategy enum's non-default value. It adds little on price/sku/barcode, but the high-risk parameters are covered.

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+resource+scope: 'Add new variants to an existing product.' An agent can immediately distinguish this from shopify_create_product, shopify_update_product, and shopify_bulk_update_variants without opening any schema.

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?

Gives explicit procedural guidance ('Read the product's options first with shopify_get_product_by_id') and a conditional rule for strategy REMOVE_STANDALONE_VARIANT. It does not, however, say when to prefer this over siblings like shopify_bulk_update_variants or shopify_delete_variants.

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