Pricing: Get Store Rule
get_pricing_rule[Pricing Rule]
[What it does] Reads one owned store's Tool-facing Pricing Settings: the active mode (none, basic, advanced, or ai_custom), saved Basic, Advanced, and AI Custom bodies, price endings, exchange-rate context, non-blocking warnings, and the resource_version required by updates. Inactive saved rules are returned only as context.
[When to use] Use when the user asks for a store's pricing formula, strategy, margins, price endings, or exchange rate, and immediately before every update_pricing_rule call.
[When not to use] To save Pricing Settings, use update_pricing_rule. To calculate the price one managed product would receive, use simulate_pricing_rule. To change product prices, use the applicable product update Tool; this Tool never reprices products.
[How to use]
Copy
dsers_store_idfromlist_stores. Pricing Rules are store-wide; there is no account-wide or per-product rule.Read
modefirst. Only its matching body is active. Foradvanced, readformula_mode:fixedusesfixed_rangesandfixed_rest, whilecustomusescustom_rangesandcustom_rest. Other returned bodies are inactive saved rules and must not be reported as current.Advanced
customformulas are view-only: reportcustom_rangesandcustom_rest, but do not pass them toupdate_pricing_rule; only Advancedfixedformulas can be modified through that Tool.ai_customis separate from Advancedcustom. Reportai_custom_ruleonly when present and useai_custom_formula_for_useras read-only presentation.When
needs_initial_ruleis true, the store has only an unsaved default shell. The first rule save needs a complete matching rule body, but cents or currency may still be updated independently.If
warningsreports an invalid saved AI Custom formula, show that warning to the user. The invalidai_custom_ruleis omitted, while Basic, Advanced, cents, currency, andresource_versionremain usable.Basic and Advanced range boundaries are inclusive USD decimal costs on a fixed 0.01 grid. AI Custom explicit monetary fields are USD decimals. Store currency and exchange-rate settings are returned separately and must not be used to reinterpret saved rule values.
Copy
resource_versionunchanged into the next update. After any successful update, discard the old version and read again before another change. [Side effects] None; read-only. [Confirmation] Not required.
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>"
},
"name": "get_pricing_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dsers_store_id | Yes | Copy from list_stores response dsers_store_id field. Required. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Active page mode: none, basic, advanced, or ai_custom | |
| cents | Yes | Store price-ending settings | |
| currency | No | Store pricing currency | |
| warnings | No | Non-blocking pricing-state problems that need user attention | |
| basic_rule | Yes | Saved page Basic Pricing Rule | |
| advanced_rule | Yes | Saved Advanced Pricing Rule | |
| currency_rule | Yes | Whether account currency conversion participates in pricing rules | |
| ai_custom_rule | No | Saved structured AI Custom Pricing Rule | |
| dsers_store_id | Yes | DSers store ID as a decimal string | |
| resource_version | Yes | Opaque version required by update_pricing_rule | |
| sales_channel_id | Yes | Sales channel ID as a decimal string | |
| sales_store_name | Yes | Sales store display name | |
| currency_settings | Yes | Store exchange-rate settings | |
| needs_initial_rule | Yes | Whether this store needs a complete rule body before its first pricing-rule save | |
| toolcall_response_at | Yes | UTC timestamp when the Tool response was returned, formatted as RFC3339. | |
| ai_custom_formula_for_user | No | Read-only generated AI Custom formula presentation |