Skip to main content
Glama

Variant Matrix

variant_matrix
Read-onlyIdempotent

Count the variants a set of options produces, and flag the ceilings. FREE.

Option counts multiply, so three modest lists become a number nobody intended. Typical input {"options": {"Size": ["S", "M", "L"], "Colour": ["Black", "Navy"]}} returns {"option_count": 2, "variant_count": 6, "within_limits": true, "per_option": {"Size": 3, "Colour": 2}}.

Use before building an import file, to find out whether the catalogue needs splitting into several products. Not for validating the resulting CSV's columns — that is product_csv_check. Errors: on invalid, missing, or malformed input this tool never raises a protocol error — it returns {"error": ""} (for example {"error": "options must contain at least one option"}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
optionsYesOption names mapped to their values, e.g. {"Size": ["S", "M"], "Colour": ["Black"]}. Each list needs at least one value.
list_rowsNoWhen true, also return every variant combination. Off by default because the list can be very large.
max_optionsNoCeiling on distinct option names. Default 3.
max_variantsNoCeiling to check against. Default 2048, which is the limit Shopify announced on 15 October 2025, up from 100. Override it if your plan differs.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint. The description reinforces these and adds valuable detail about error handling: 'on invalid, missing, or malformed input this tool never raises a protocol error — it returns an error object'. This goes beyond the annotations by specifying the exact error contract and retry safety.

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 thorough but tightly written. Every sentence serves a purpose: purpose, usage example, use-case timing, sibling comparison, error behavior, and idempotency. No fluff or redundant repetition of the schema.

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?

Given the tool's moderate complexity and helpful annotations, the description covers all key aspects: what it does, example I/O, when to use it, what it does not do (with sibling reference), error handling, and retry safety. This is sufficient for an agent to invoke it correctly and handle edge cases.

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?

The schema covers all parameters well (100% coverage). The description augments this with meaningful context, such as the origin of the default 'max_variants' limit ('Shopify announced on 15 October 2025') and why 'list_rows' defaults to false ('the list can be very large'), which adds semantic value beyond field descriptions.

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 begins with a clear action: 'Count the variants a set of options produces, and flag the ceilings.' It includes a concrete input/output example and explicitly contrasts with a sibling tool ('that is product_csv_check'), making the tool's unique role obvious.

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

Usage Guidelines5/5

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

It states exactly when to use the tool ('Use before building an import file, to find out whether the catalogue needs splitting into several products') and when not to, naming the sibling tool 'product_csv_check' for CSV column validation. This is textbook explicit usage guidance.

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.

TDQS

A4.7/5.0
Disambiguation5/5

Each tool serves a distinct purpose (pricing, metafields, payouts, CSV headers, URL handles, variant counts) with no overlap in functionality. Descriptions clearly delineate scope and typical use cases.

Naming Consistency5/5

All tool names follow a consistent snake_case pattern with descriptive noun+verb or compound noun structures (e.g., bulk_price_change, metafield_key_check). No stylistic inconsistencies.

Tool Count5/5

Six tools is a well-scoped set for a Shopify preparation server, covering essential tasks without redundancy or unnecessary bloat. Each tool addresses a specific preparation need.

Completeness5/5

The toolset covers the core preparation workflows: pricing adjustments, metafield validation, payout estimation, CSV format checking, URL handle generation, and variant limit assessment. No obvious gaps for the stated domain.

Resources