Skip to main content
Glama

Import: Update Product Content

update_pre_publish_product_content
Destructive

[Import List Product] [What it does] Changes non-price content of one pre-publish product — an item on the DSers Import List page: title, description, images, package, options and option values, variants, SKUs, and stock, including deletions and duplications. [When to use] Use it when the user wants to edit, clean up, or save translated content for a pre-publish product, and once the agent has final wording or has identified the exact rows to change. Trigger words: change the title, edit description, remove images, delete variants, fix this import list product, save translation. [When not to use] For selling or compare-at prices, use update_pre_publish_product_price. For a product already pushed to a store, including Draft status, use update_managed_store_product. It does not translate; it only saves content you already produced. [How to use]

  • Take import_item_id and resource_version from a fresh get_pre_publish_product; stale versions are rejected, and at least one editable field must be sent.

  • Every option, option-value, and variant operation needs the ID plus its zero-based index, because duplicated rows keep the original ID.

  • supplier_product_image_url_list replaces the whole list rather than appending; resend all images even to add one, the first becomes the main image, and each must be a public HTTPS URL with a resource path.

  • Deletions cascade: removing an option value deletes every variant using it, and delete_options keeps only variants matching the reserve value you name. At least one option, one value, and one variant must remain.

  • Titles of variants that have options are derived; rename them through rename_option_values, not supplier_product_variant_list[].supplier_product_variant_name.

  • An empty string clears a field while omitting it preserves the field; cost, currency, and supplier are protected and cannot be changed.

  • This write is not idempotent. Send it once. The server verifies the stored content before returning import_item_id, changed_fields, changed_variant_ids, and changed_option_ids; it does not return a new resource_version. Before another write, or if the outcome is unknown, re-read with get_pre_publish_product instead of resending.

  • Import List products, draft products, and pre-publish products name the same objects; accept the old wording and answer in generic product terms rather than sending the user to a page. [Side effects] Rewrites the pre-publish product; deletions cannot be undone. [Confirmation] Required but skippable; always confirm deletions first.

Input Schema

NameRequiredDescriptionDefault
packageNoOptional product package update. Provide at least one field; omitted fields are preserved and empty strings clear supplied fields. Paste JSON example: {"dimension_unit":"CENTIMETER","height":"5","length":"20","weight":"0.5","weight_unit":"KILOGRAMS","width":"10"}.
delete_optionsNoDelete whole options while preserving supplier mapping. At least one product option remains. For each deleted option, choose one current option value to retain in reserve_option; only variants matching all selected reserve values remain. Paste JSON example: [{"reserve_supplier_product_option_value_id":"10002","reserve_value_index":0,"supplier_product_option_id":"10001"}].
import_item_idYesCopy from get_pre_publish_product response import_item_id field. Required.
delete_variantsNoOptional variant rows to delete. At least one variant must remain. Always copy both supplier_product_variant_id and variant_index from detail. Paste JSON example: [{"supplier_product_variant_id":"10050011958743970","variant_index":0}].
resource_versionYesCopy from get_pre_publish_product response resource_version field. Stale versions are rejected — re-read get_pre_publish_product if more than a few minutes old. Required.
duplicate_variantsNoCopy individual variant rows. The copied row retains supplier_product_variant_id but must receive a distinct new_sku. Paste JSON example: [{"new_sku":"SKU-BLACK-M-COPY","supplier_product_variant_id":"10050011958743970","variant_index":0}].
option_value_imagesNoOptional option-value picture changes. Matching variant option items and variant images are synchronized. An empty supplier_product_option_value_image_url clears the picture. Paste JSON example: [{"supplier_product_option_id":"10001","supplier_product_option_value_id":"10002","supplier_product_option_value_image_url":"https://example.com/black.jpg","value_index":0}].
delete_option_valuesNoOptional option-value deletions. Each deleted value is removed from its option and every variant using it is deleted. At least one value must remain in that option and at least one product variant must remain. Paste JSON example: [{"supplier_product_option_id":"10001","supplier_product_option_value_id":"10002","value_index":0}].
rename_option_valuesNoRename option values. The option definition, every matching variant option item, and every affected derived variant title are updated together. Paste JSON example: [{"supplier_product_option_id":"10001","supplier_product_option_value_id":"10002","supplier_product_option_value_name":"Black","value_index":0}].
supplier_product_titleNoOptional replacement supplier product title. It is trimmed, must remain non-empty, and is limited to 5000 bytes.
duplicate_in_option_valuesNoCopy an option value as the Import List page does. The copied value retains source_supplier_product_option_value_id, receives new_supplier_product_option_value_name, and each copied variant retains supplier_product_variant_id but receives a distinct new_sku. Paste JSON example: [{"new_supplier_product_option_value_name":"Navy","source_supplier_product_option_value_id":"10002","source_value_index":0,"supplier_product_option_id":"10001","variant_skus":[{"new_sku":"SKU-NAVY-M","supplier_product_variant_id":"10050011958743970","variant_index":0}]}].
supplier_product_descriptionNoOptional replacement supplier product description. Empty clears it. Dangerous executable HTML is rejected; maximum 500000 bytes.
supplier_product_variant_listNoOptional variant field changes. Always provide supplier_product_variant_id and variant_index. For variants with options, titles are derived and must be changed through rename_option_values. Paste JSON example: [{"supplier_product_variant_id":"10050011958743970","supplier_product_variant_sku":"SKU-BLACK-M","variant_index":0}].
supplier_product_image_url_listNoOptional final ordered supplier product image URL list. Replaces the current list; the first URL becomes the main image. Use 1-100 unique public HTTPS image URLs with a resource path. Paste JSON example: ["https://example.com/product-main.jpg","https://example.com/product-detail.jpg"].

Output Schema

NameRequiredDescriptionDefault
changed_fieldsNoEditable fields changed by this mutation
import_item_idYesUpdated import-list item ID
changed_option_idsNoOptions changed by this mutation
changed_variant_idsNoVariant rows changed by this mutation
toolcall_response_atYesUTC timestamp when the Tool response was returned, formatted as RFC3339.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructive=true and idempotent=false, but the description goes well beyond them: cascading deletion rules, the minimum-one-option/value/variant invariant, protected cost/currency/supplier fields, stale resource_version rejection, the fact that no new resource_version is returned, and the instruction to re-read rather than resend. The only shortfall is that 'Confirmation: required but skippable' is stated without explaining what that means operationally.

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

Conciseness3/5

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

It is front-loaded and clearly partitioned with bracketed headers, which suits a 14-parameter destructive tool. However it is lengthy and several operational bullets restate what the per-parameter schema descriptions already say, so not every sentence earns its 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?

For a non-idempotent, destructive 14-parameter write tool, it covers everything an agent needs: read-before-write sourcing of import_item_id and resource_version, at-least-one-field requirement, cascade rules, and post-write recovery procedure. With an output schema present, the brief mention of returned fields is sufficient rather than padded.

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 coverage is 100%, so the baseline is 3, and the description does add cross-field meaning the schema cannot express: why the zero-based index is mandatory (duplicated rows retain the original ID), that image lists replace rather than append, and that variant titles must be changed via rename_option_values. Some bullets duplicate schema text verbatim (empty clears, first image becomes main), which keeps it from a 5.

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 and resource ('Changes non-price content of one pre-publish product') and enumerates the covered fields (title, description, images, package, options, variants, SKUs, stock). It explicitly carves out the two nearest siblings, update_pre_publish_product_price and update_managed_store_product, so an agent can route without opening either schema.

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?

Has explicit 'When to use' and 'When not to use' sections naming the alternative tools for price changes and for store-pushed/Draft products, plus trigger phrases. The prerequisite ('once the agent has final wording or identified the exact rows') and the statement that it does not translate set clear boundaries.

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.