Skip to main content
Glama

set_commerce_product_options

Destructive

Set a product's variation axes (size, colour, ...) and rebuild its variants.

By default the full variant matrix is regenerated: variants matching an existing option combination keep their id, SKU, price, and stock; combinations that no longer exist are removed. Pass variants to control the set explicitly.

Args: project_id: The project ID. product_id: The product ID. options: JSON array of up to 3 axes, e.g. [{"name":"Size","values":["S","M","L"]},{"name":"Colour","values":["Black","White"]}]. Send [] to remove all options and variants. variants: Optional JSON array of variants to use instead of the generated matrix.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
optionsYes
variantsNo
product_idYes
project_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag this as destructive and open-world, and the description adds substantive context beyond them: exactly what gets preserved (id, SKU, price, stock for surviving combinations), what gets removed (combinations that no longer exist), and the default-vs-explicit mode. This is unusually rich disclosure for a mutation tool and is consistent with destructiveHint=true.

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 single-line summary is front-loaded with the core action and default behavior, followed by an Args block. No sentence is redundant; the behavioral detail and parameter docs each earn their place.

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

Completeness5/5

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

An output schema exists, so return values need not be described. The description covers the mutation's side effects, the default vs explicit control path, the clearing case, and every parameter's format and meaning — nothing an agent needs to invoke it correctly is missing.

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

Parameters5/5

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

Schema coverage is 0%, so the description carries the full burden and does so: it documents all four params, gives a concrete JSON example for `options` including the max of 3 axes, specifies the `[]` clearing semantics, and marks `variants` as optional with its purpose. This fully compensates for the bare schema.

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?

States a precise verb (set) and resource (a product's variation axes), and describes the consequential effect (rebuild its variants) with concrete examples of axes. It is clearly distinct in intent, but it never names or contrasts with the closest sibling, generate_commerce_variants, so the agent must infer the boundary rather than being told it.

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 draws the key operating decision explicitly: by default the full variant matrix is regenerated, and passing `variants` overrides that to control the set. It also notes that `options: []` removes all options and variants. What's missing is guidance on when to prefer this tool over siblings like generate_commerce_variants or update_commerce_variant.

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.

Resources