Skip to main content
Glama

Create catalog product

create_catalog_product
Destructive

Create one catalog product as one row per variant on a catalog sheet. A variant whose option is still a size range (such as XS-XXL or 28-36), or 2 or more variants with two price attributes and no barcode_mode, returns needs_input until a catalog plan_token from plan_import is sent. SKU is optional and is never a reason for needs_input. On a planned write, accepted_gaps must equal the signed list. Empty brand, type, and an unexpanded size can still block. An empty barcode is not a gap when barcode_choice is none or cloudlabels_ean13. Otherwise an empty barcode can still block. Selling Price and attribute names are not price_without_currency or unknown_columns blockers. manual_fixes counts variants of this product and omits row indexes. A normal product with explicit sizes is unchanged, including 10 or more variants. plan_token is optional. When a token is sent, its signed answers must cover the relevant questions and barcode_mode must match barcode_choice. A token without answers is rejected: call plan_import again. Do not pick a default. When a plan_token is sent, it must record enable_catalog true and a barcode_choice, and barcode_mode must match that choice. This tool does not turn Catalog on and does not turn on the barcode generator. When the token is accepted, the result includes import_check. If mismatch is true, tell the user and do not hide it. There is one sellingPrice role. Put a second price in attributes only after the user agrees to that column. Writes Name, SKU, Brand, Type, Selling Price, optional Unit Cost, Description, and Notes by Catalog role (fieldMappings). Roles are photo, name, sku, barcode, unitCost, sellingPrice, type, brand, totalQty, defaultLocation, variantOption1, variantOption2, description, notes. Without a role map, the English names are used. option_1 and option_2 go to the variant option columns (role variantOption1/variantOption2, or Group option 1 and 2, Colour and Size). Category is Type. Optional top-level description and notes, plus per-variant overrides, write through those roles. type, selling_price, brand, unit_cost, description, and notes fail with a mapping error when the role is unmapped: add_column if needed, then adopt_catalog_sheet with role_overrides. Do not send those through attributes. Optional attributes write only visible extra columns that no catalog role maps to, by the exact header from get_sheet_settings. Each name is resolved the same way createItems resolves fields (lowercase, trim, column id). The resolved column must be an extra. Names that match barcode/ean/ean-13/gtin/upc, look like data1, or collide with another header after lowercase/trim are refused. Role-mapped names (Name, SKU, Barcode, prices, Type, Brand, Photo, option 1/2, qty, location, Description, Notes, and the rest) and hidden columns (including Shopify reserved data13-28 and hidden data slots) are refused. Unknown names are rejected and the error lists only the valid extras. At most 20 keys, each value 500 characters or fewer. Variant rows are inserted in one batch. Optional variant.barcode supplies a GTIN for that row. If no barcode is given, Show choices together. Clickable form if the client supports it. Otherwise one number, only when it cannot show choices. Wait. Do not choose for the user. Do not continue until the user has answered. Do you want barcodes? No, no barcodes now (barcode_mode="none"). Cloudlabels generates EAN-13 (codes starting with 2 are internal store codes, not registered GS1 codes), barcode_mode="cloudlabels_ean13". This call only. Does not change sheet settings. I have my own codes (own GTIN). No option is recommended. A needs_input error lists those options. Cloudlabels can generate EAN-13 only. If the organization has opted in to its GS1 company prefix for this column and the sheet standard is EAN-13, UPC-A, or EAN-8, each new row reserves the next prefix number before saving and barcodeSource is gs1_prefix. The cell stores the digit body without the check digit. A full prefix is an error and does not fall back to a random code. Pass image_url only as a public https image; the same URL can be repeated for sizes that share a photo. Optional unit_cost at product level can be overridden per variant. Optional option_1_label/option_2_label rename the sheet axes only when rename_sheet_axes is true, or when the current labels are empty or the catalog defaults (Group option 1 / Group option 2). Otherwise the sheet labels are kept and the response says so. A variant column header is renamed to the axis name when it is empty, Group option 1 or Variant option 1 on the first axis, Group option 2 or Variant option 2 on the second axis, or the exact default for that column id (Data 1 to Data 60 with one space, such as Data 11 on data11). Headers such as data12, Data 11, Data 99, or Data 5 on a different column are custom and are kept unless rename_sheet_axes is true. If the new name matches another column header, visible or hidden, that header is kept and the response says the name is already used. The response says which columns were renamed and which were kept. The column id and catalog role stay the same. Retry the same product name with the same option_1, option_2, and sku values to get the saved rows back with already_existed: true and no new rows. attributes, description, and notes on that retry are not applied. If that product name already has a different variant list, the call fails and lists the saved variants. It does not merge them. Use add_catalog_variants to add variants to that product. Extra copies of the same option pair that are already on the sheet are left in place, and the first matching set is returned. Optional idempotency_key is stored for 24 hours for this organization and this tool when mcp_idempotency exists. The same key and the same arguments return the stored result and do not insert again. The same key with different arguments is rejected. A key that is still in progress is rejected. The in-process guard remains: for 10 minutes in this server process it returns the first success for that organization and key even when the arguments differ, and it is not shared across servers. Without a key, overlapping calls for the same organization, sheet, and product name are serialized in this process only. Optional idempotency_key. Omit this field when it is not used. Null, an empty string, or only spaces are also treated as omitted. Use a unique value such as a UUID. The same key and the same arguments return the stored result for 24 hours and set idempotent_replay to true. A key still in progress is rejected until the lease expires (15 minutes by default). The same key can also stay reserved until the lease expires (15 minutes by default) after a call failed after writing rows, so check whether those rows were saved before trying again. The same key with different arguments is rejected. A stored result over 200 KB is replaced by a short summary of ids and counts.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "variants": "<variants>"
    },
    "name": "create_catalog_product"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
typeNo
brandNo
notesNo
variantsYes
unit_costNo
attributesNo
plan_tokenNo
descriptionNo
barcode_modeNo
sheet_numberNo
accepted_gapsNo
selling_priceNo
option_1_labelNo
option_2_labelNo
idempotency_keyNoOptional. Omit this field when it is not used. An empty string is also treated as omitted. Use a unique value such as a UUID when you send one. Same key and same arguments return the stored result for 24 hours in this organization, with idempotent_replay true. A different payload is rejected.
rename_sheet_axesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / accepted_gaps
      Added value: +{
      +  "items": {
      +    "enum": [
      +      "empty_sku",
      +      "empty_barcode",
      +      "empty_brand",
      +      "empty_type",
      +      "size_unexpanded",
      +      "price_without_currency",
      +      "unknown_columns"
      +    ],
      +    "type": "string"
      +  },
      +  "maxItems": 7,
      +  "type": "array"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / plan_token
      Added value: +{
      +  "type": "string"
      +}
  3. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, openWorldHint=true and idempotentHint=false, and the description adds substantial context beyond them: it does not enable Catalog or the barcode generator, GS1 prefix numbers are reserved before saving with no random-code fallback, rows are inserted in one batch, and needs_input/import_check/already_existed behaviors are disclosed. The idempotency narrative (24-hour stored result, in-process 10-minute guard, 15-minute lease) is more specific than the idempotentHint=false annotation but is conditional on a key rather than contradictory; the real weakness is that the idempotency content is duplicated in two long overlapping blocks.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

After a strong first sentence the description degenerates into a roughly 1,300-word wall that embeds user-dialogue scripts ('Do you want barcodes? No, no barcodes now...', 'Wait. Do not choose for the user'), which do not belong in a tool definition. The idempotency behavior is stated twice in near-duplicate blocks, and the schema's own idempotency_key description is repeated again, all of which buries the load-bearing rules.

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 destructive, high-parameter write with no output schema, the description is unusually complete: it describes return signals (needs_input options, import_check.mismatch, already_existed, idempotent_replay, 200 KB result summarization), failure modes, and the retry contract with identical name/option/sku values. The one structural gap is that sheet_number is never addressed, and the embedded conversation script adds noise rather than completeness.

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?

With only 6% schema description coverage across 17 parameters, the description carries the burden and largely does: it explains sku is optional and never a needs_input reason, barcode supplies a per-row GTIN, image_url must be a public https URL, unit_cost is overridable per variant, attributes map only to unmapped visible extra columns with exact-header rules, plan_token/accepted_gaps/barcode_mode must agree with the signed plan, and option_1_label/option_2_label rename axes only under stated conditions. Only sheet_number is left entirely unexplained, and the coverage is disorganized rather than complete.

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 opening sentence gives a specific verb, resource and shape: 'Create one catalog product as one row per variant on a catalog sheet.' It later names add_catalog_variants as the tool for adding variants to an existing product, which helps separate it from that sibling, but it never contrasts itself with create_catalog_products (plural), leaving the batch-vs-single choice ambiguous.

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?

Usage conditions are dense and explicit: needs_input triggers (unexpanded size ranges, two price attributes with no barcode_mode), prerequisites (a catalog plan_token from plan_import), and the explicit alternative route ('Use add_catalog_variants to add variants to that product'). It also tells the agent what to do on rejection ('call plan_import again'), though the guidance is scattered across error, barcode, retry and idempotency paragraphs rather than organized, and sheet_number handling is never covered.

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