Skip to main content
Glama

Pricing: Update Store Rule

update_pricing_rule

[Pricing Rule] [What it does] Saves one owned store's Pricing Settings. A call may update any combination of the store-wide Basic or Advanced fixed rule, price endings, and exchange-rate mode. Supported rule modes are none, basic, and advanced; Advanced custom formulas are view-only and cannot be modified with this Tool. [When to use] Use only when the user explicitly asks to change a store's Pricing Settings, after a fresh get_pricing_rule read and after the user confirms the exact resulting store-wide configuration. [When not to use] To inspect settings, including an Advanced custom formula, use get_pricing_rule. To preview a product price, use simulate_pricing_rule. To change live or pre-publish product prices, use the applicable product update Tool. This Tool changes the rule itself; it does not reprice existing products. [How to use]

  • Always call get_pricing_rule first. Copy dsers_store_id and resource_version unchanged. A successful write invalidates that version.

  • For a rule update, choose exactly one mode and its matching complete body: mode=none sends no rule body; mode=basic requires basic_rule; mode=advanced requires advanced_rule with formula_mode=fixed. Never send a body belonging to another mode.

  • Advanced formula_mode=fixed requires fixed_ranges and fixed_rest and must not send custom fields. Advanced formula_mode=custom, custom_ranges, and custom_rest are read-only and must not be submitted. Inactive saved Advanced fields are preserved.

  • Basic and Advanced fixed boundaries are inclusive USD costs with at most two decimal places and min < max. Their bounded gaps are completed on the 0.01 grid from the matching rest formula. Collections may contain at most 100 ranges after completion.

  • Advanced mode requires the current plan's pricing-rule benefit; unsupported plans receive an upgrade-required error before any write.

  • The rule, cents, and currency sections are updated independently. Omit top-level mode for a cents-only or currency-only update. Omitted sections are preserved; only an explicit false disables a cent-ending switch. A custom rate requires custom mode: mode=default omits exchange_rate; mode=custom requires a positive exchange_rate.

  • This Tool is not idempotent. Send once. If the result is unknown or partial, call get_pricing_rule and submit only what still differs. On success the server has read back and verified the saved state and returns the new resource_version. [Side effects] Changes store-wide Pricing Settings used by future price calculations, but does not directly rewrite existing product prices. [Confirmation] Mandatory and not skippable. Show the store, resulting active mode and formula, completed ranges, and every cents or currency change before calling.

Input Schema

NameRequiredDescriptionDefault
modeNoOptional resulting page pricing mode. Provide its complete matching rule body. Advanced requires the current DSers plan's pricing_rule benefit; unsupported plans receive an upgrade-required error before any write. Omit for independent cents or currency updates.
centsNoOptional independent store price-ending settings. May be updated by itself, even before a pricing-rule template is saved. Paste JSON example: {"compare_at_cents":"99","compare_at_enabled":true,"price_cents":"99","price_enabled":true}.
currencyNoOptional independent store exchange-rate update. Use mode default without exchange_rate, or mode custom with a positive exchange_rate. Paste JSON example: {"exchange_rate":"1.08","mode":"custom"}.
basic_ruleNoRequired with mode basic. This is the page Basic range-and-rest structure backed by upstream StandardPricing. Ranges are USD-denominated costs and may be empty; when empty, rest applies to every cost. Missing leading or internal bounded intervals are completed on the fixed 0.01 grid using copies of rest; rest remains the separate unlimited tail. Paste JSON example: {"basis":"product_cost","compare_at_basis":"product_cost","ranges":[{"max":"9.99","min":"0","pricing":{"compare_at":{"basis":"product_cost","operator":"multiply","value":"2.5"},"operator":"multiply","value":"2"}}],"rest":{"compare_at":{"basis":"product_cost","operator":"multiply","value":"2.5"},"operator":"multiply","value":"2"}}.
advanced_ruleNoRequired with mode advanced. Only formula_mode fixed can be modified; Advanced custom formulas are view-only through get_pricing_rule. Provide fixed_ranges and fixed_rest, and do not submit custom_ranges or custom_rest. Ranges are USD-denominated costs, and fixed gaps are completed on the fixed 0.01 grid using copies of fixed_rest. Paste JSON example: {"fixed_ranges":[{"formula":{"breakeven_percent":"0","compare_at":{"enabled":true,"operator":"multiply","value":"1.2"},"fixed_profit":"0","minimum_profit":"1","multiplier_factor":"1","profit_percent":"20","shipping":{"enabled":true,"fixed_cost":"5","mode":"fixed","suppliers":[]},"tax":{"enabled":false,"fixed_amount":"0","mode":"fixed"}},"max":"9.99","min":"0"}],"fixed_rest":{"breakeven_percent":"0","compare_at":{"enabled":true,"operator":"multiply","value":"1.2"},"fixed_profit":"0","minimum_profit":"1","multiplier_factor":"1","profit_percent":"20","shipping":{"enabled":true,"fixed_cost":"5","mode":"fixed","suppliers":[]},"tax":{"enabled":false,"fixed_amount":"0","mode":"fixed"}},"formula_mode":"fixed"}.
dsers_store_idYesCopy from get_pricing_rule response. Required.
resource_versionYesCopy from resource_version in get_pricing_rule response. Required.

Output Schema

NameRequiredDescriptionDefault
resource_versionYesVersion of the saved pricing rule; copy it into any later update_pricing_rule call
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.8/5.0
Behavior5/5

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

Annotations already declare a non-readonly, non-idempotent write, and the description corroborates and enriches this: resource_version invalidation on write, an explicit "not idempotent, send once" recovery path, plan/benefit gating that can fail before any write, independent section updates with omission-preserves semantics, and a side-effects note that existing product prices are not rewritten. It also discloses that the server reads back and verifies saved state.

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?

Labeled bracketed sections make it front-loaded and scannable, and the length is justified by a 7-parameter deeply nested non-idempotent mutation. There is some duplication, notably gap-completion rules repeated between the How-to-use bullets and the schema descriptions, plus overlap between the Side effects and When not to use sections.

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-shape detail is unnecessary, yet the description still notes the returned new resource_version. Confirmation requirements, plan gating, recovery after unknown results, and preservation semantics are all covered, leaving no material gap for an agent calling this mutation.

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 100% schema coverage the baseline is 3, and the description does add cross-field meaning the schema cannot express as easily: one mode must pair with exactly one matching body, omit top-level mode for cents-only or currency-only updates, and only an explicit false disables a cent switch. However, several bullets (gap completion, inclusive boundaries, two-decimal limits, 100-range cap) largely restate text already present in the schema property descriptions rather than adding new meaning.

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?

Opens with a specific verb and resource: "Saves one owned store's Pricing Settings," then enumerates exactly what can change (Basic/Advanced fixed rule, price endings, exchange-rate mode) and what cannot (Advanced custom formulas are view-only). Sibling boundaries are drawn explicitly against get_pricing_rule, simulate_pricing_rule, and product update tools.

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 dedicated When to use and When not to use sections naming each alternative tool and the condition that selects it (inspect, preview, change product prices, change the rule itself). It also states a prerequisite sequence: fresh get_pricing_rule read plus explicit user confirmation.

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.