Skip to main content
Glama

Import: Update Product Prices

update_pre_publish_product_price
Destructive

[Import List Product] [What it does] Supports three modes for one pre-publish product on the DSers Import List: variants changes selling and compare-at prices for exact variant rows, fixed_price sets one selling price for every variant, and pricing_rule only opens or closes the item's item-level pricing rule. Every successful price change automatically closes the item's item-level pricing rule in the same write. It never changes the store-level Pricing Rule. [When to use] Use it when the user wants to reprice a pre-publish product or explicitly open or close that import item's pricing rule. Before a price change, re-read the item, compute every target price, disclose that the item-level pricing rule will be closed, and proceed only after the agent has obtained confirmation. Trigger words: reprice a product that is not published yet, adjust prices before publishing, set one price for every variant, open or close this import item's pricing rule. [When not to use] For titles, images, options, or other non-price content, use update_pre_publish_product_content. For a product already pushed to a store, including Draft status, use update_managed_store_product; this tool never syncs store prices. To change the store-level Pricing Rule itself, use update_pricing_rule. [How to use]

  • Take import_item_id and resource_version from a fresh get_pre_publish_product; a version more than a few minutes old is rejected as stale.

  • Amounts are plain decimals with up to two places and are always stored as 77.77 to 7777; the dsers_store_id currency is a display label only and changes neither conversion nor precision.

  • Pick exactly one mode and send only its matching argument: variants with supplier_product_variant_list, fixed_price with fixed_price, or pricing_rule with pricing_rule_status.

  • variants and fixed_price automatically close the item-level pricing rule. Do not send pricing_rule_status with either price mode. Price changes and the close happen atomically in one Product BFF write and are both verified by read-after-write.

  • pricing_rule changes only the item-level pricing-rule status. It does not change prices, compare-at prices, price bounds, or is_price_edited; do not send price fields in this mode.

  • fixed_price applies atomically to every variant and cannot target a subset.

  • supplier_product_variant_list accepts 1 to 100 rows in variants mode; add variant_index whenever a supplier_product_variant_id is duplicated.

  • Send supplier_product_variant_compare_at_price_amount only on explicit request: a non-empty value must not be below the resulting price, and an empty string clears it. Never raise or clear it on your own when only price was requested.

  • This write is not idempotent. Send it once. The server verifies the stored update before returning import_item_id, changed_fields, and message; it does not return a new resource_version or warning list. Before another write, or if the outcome is unknown, re-read with get_pre_publish_product to confirm prices, compare-at values, the item-level rule, and the latest version instead of resending.

  • Stock or cost requests must go to update_managed_store_product; this tool changes only selling and compare-at prices. When the publish state is unclear, or the same product exists both as a pre-publish item and a store product, ask which side to change instead of defaulting.

  • 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] variants and fixed_price persist pre-publish prices and close the item-level pricing rule; pricing_rule changes only that status. Published store products are unaffected. [Confirmation] Required, never skippable. For price modes, show before and after prices per variant and state that the item-level pricing rule will close. For pricing_rule, show only the requested status change.

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": {
      "dsers_store_id": "<dsers_store_id>",
      "import_item_id": "<import_item_id>",
      "mode": "<mode>",
      "resource_version": "<resource_version>"
    },
    "name": "update_pre_publish_product_price"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYesExactly one mode. `variants` changes exact rows and automatically closes the item-level pricing rule; `fixed_price` changes every variant and automatically closes the item-level pricing rule; `pricing_rule` changes only that rule status. Supply only the selected mode's matching argument.
fixed_priceNoRequired only for fixed_price mode. Sets this non-negative decimal selling price on every variant and automatically closes the item-level pricing rule in the same write. Supports up to two decimal places; 77.77 is always stored as 7777 regardless of the selected store's display currency.
dsers_store_idYesOwned target DSers store ID. Copy from list_stores. Its pricing_currency is returned only as a display label.
import_item_idYesCopy from get_pre_publish_product response import_item_id field. Required.
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.
pricing_rule_statusNoRequired only for pricing_rule mode: open or close this import-list item's item-level pricing rule without changing any price field. It must be omitted from price modes because variants and fixed_price automatically close the item-level rule. It never changes the store-level Pricing Rule.
supplier_product_variant_listNoRequired only for variants mode. One to 100 exact supplier variant price changes using rows from get_pre_publish_product; a successful write automatically closes the item-level pricing rule. Amounts are normal decimals with up to two decimal places; the selected store currency is display-only. When changing only price, omit supplier_product_variant_compare_at_price_amount. Paste JSON example: [{"supplier_product_variant_id":"10050011958743970","supplier_product_variant_price_amount":"19.99","variant_index":0}].

Output Schema

NameRequiredDescriptionDefault
messageYesHuman-readable mutation outcome
changed_fieldsNoEditable fields changed by this mutation
import_item_idYesUpdated import-list item ID
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.9/5.0
Behavior5/5

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

Annotations only flag destructive/non-idempotent; the description goes much further by disclosing the atomic Product BFF write, the automatic closure of the item-level pricing rule on any price change, read-after-write verification, stale resource_version rejection, and the absence of a returned resource_version or warning list. The non-idempotency warning with a recovery procedure (re-read instead of resending) is exactly the behavioral context annotations cannot convey.

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

Conciseness4/5

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

Bracketed section headers ([What it does]/[When to use]/[When not to use]/[How to use]/[Side effects]/[Confirmation]) make it scannable and front-load the modes. It is long and repeats the auto-close rule in the [What it does], bullet list, and [Side effects] sections, but for a destructive, non-idempotent write the length is mostly justified.

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?

A high-risk mutation with 7 parameters and enum-driven branching; the description covers required reads, mode selection, side effects, verification, and confirmation. Output schema exists, so not explaining return values is correct, and the description still notes which fields are returned.

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 already 100%, yet the description still adds cross-field semantics the schema cannot express: exactly one mode and only its matching argument, never send pricing_rule_status with a price mode, 1–100 rows with variant_index required only for duplicate IDs, and fixed_price cannot target a subset. The compare-at constraint (empty string clears it, must not fall below the resulting price, never change it unprompted) clarifies interaction between two parameters.

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 the exact resource (one pre-publish product on the Import List) and enumerates the three modes with what each one changes. It explicitly contrasts itself against update_pre_publish_product_content, update_managed_store_product, and update_pricing_rule, so an agent can distinguish it from every adjacent tool.

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?

Contains an explicit [When to use] block with trigger phrases plus a [When not to use] block that routes non-price edits, already-published products, and store-level rule changes to the correct siblings. It also names the prerequisite (fresh get_pre_publish_product read) and the mandatory confirmation step, leaving nothing to inference.

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.