Skip to main content
Glama

Create variant

shop_create_variant

Creates a new variant of a given product Guidance: Creates a new variant of a given product | context: product_id, option_values, price

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skuNoStock Keeping Unit unique ID.
mediaNoUnique ID of the Product Media instance displayed with the variant.
priceYesVariant 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.
option_valuesYesList 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

B3.2/5.0
Behavior2/5

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

Annotations already indicate readOnlyHint false and destructiveHint false, but the description adds no additional behavioral context such as failure modes, side effects on existing data, or whether the operation is idempotent. No extra transparency is provided beyond the 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?

The description is a single concise sentence that directly conveys the tool's purpose without extraneous words. It is well-structured and efficient.

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

Completeness2/5

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

With 9 parameters and no output schema, the description is minimal. It does not explain success response format, potential side effects, or required relationships (e.g., product must exist). This lack of contextual detail makes it incomplete for an agent to fully understand the operation's outcomes.

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 description coverage is 100%, so all parameters have descriptive text. The tool description itself contributes no additional parameter semantics, thus the baseline score of 3 applies per the rubric.

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 'Creates a new variant of a given product' clearly states the action (creates) and the resource (a variant of a product). It is distinct from sibling tools like shop_create_product or shop_create_option, making the tool's purpose unambiguous.

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 provides no guidance on when to use this tool over alternatives or any conditions for selection. It only states the action without contrasting it with other create operations or specifying prerequisites like the need for an existing product.

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.