Skip to main content
Glama

Pricing: Get Store Rule

get_pricing_rule
Read-onlyIdempotent

[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_id from list_stores. Pricing Rules are store-wide; there is no account-wide or per-product rule.

  • Read mode first. Only its matching body is active. For advanced, read formula_mode: fixed uses fixed_ranges and fixed_rest, while custom uses custom_ranges and custom_rest. Other returned bodies are inactive saved rules and must not be reported as current.

  • Advanced custom formulas are view-only: report custom_ranges and custom_rest, but do not pass them to update_pricing_rule; only Advanced fixed formulas can be modified through that Tool.

  • ai_custom is separate from Advanced custom. Report ai_custom_rule only when present and use ai_custom_formula_for_user as read-only presentation.

  • When needs_initial_rule is 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 warnings reports an invalid saved AI Custom formula, show that warning to the user. The invalid ai_custom_rule is omitted, while Basic, Advanced, cents, currency, and resource_version remain 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_version unchanged 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

NameRequiredDescriptionDefault
dsers_store_idYesCopy from list_stores response dsers_store_id field. Required.

Output Schema

NameRequiredDescriptionDefault
modeYesActive page mode: none, basic, advanced, or ai_custom
centsYesStore price-ending settings
currencyNoStore pricing currency
warningsNoNon-blocking pricing-state problems that need user attention
basic_ruleYesSaved page Basic Pricing Rule
advanced_ruleYesSaved Advanced Pricing Rule
currency_ruleYesWhether account currency conversion participates in pricing rules
ai_custom_ruleNoSaved structured AI Custom Pricing Rule
dsers_store_idYesDSers store ID as a decimal string
resource_versionYesOpaque version required by update_pricing_rule
sales_channel_idYesSales channel ID as a decimal string
sales_store_nameYesSales store display name
currency_settingsYesStore exchange-rate settings
needs_initial_ruleYesWhether this store needs a complete rule body before its first pricing-rule save
toolcall_response_atYesUTC timestamp when the Tool response was returned, formatted as RFC3339.
ai_custom_formula_for_userNoRead-only generated AI Custom formula presentation

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description still adds real behavior: inactive saved rules are returned only as context, Advanced custom formulas are view-only and must not be fed back to update_pricing_rule, an invalid AI Custom formula is omitted with a warning while other fields stay usable, and resource_version must be discarded and re-read after any successful update. That optimistic-concurrency and partial-validity detail is exactly the context annotations cannot express.

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?

Heavily bracketed and front-loaded so an agent can skim the What/When/When-not sections, and nearly every bullet carries operational information (mode-first reading, fixed vs custom formula branches, needs_initial_rule shell semantics). It is on the long side for a one-parameter read tool, with some downstream update-tool guidance that is useful but could be tightened.

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, yet the description still explains how to interpret the non-obvious return fields (which body is active, inclusive 0.01-grid USD boundaries, currency not reinterpreting saved values), which is the part an agent would otherwise get wrong. Nothing needed to call or correctly report this tool's result is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With a single parameter at 100% schema description coverage, the schema already carries the meaning, and the description's "Copy dsers_store_id from list_stores" largely restates the schema text. It does reinforce the sourcing constraint, but adds no new syntax, format, or validation detail beyond what is already documented.

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?

The description opens with a specific verb and resource ("Reads one owned store's Tool-facing Pricing Settings") and then enumerates exactly what is returned: mode, saved Basic/Advanced/AI Custom bodies, price endings, exchange-rate context, warnings, and resource_version. It is unambiguously distinguishable from update_pricing_rule and simulate_pricing_rule 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?

Explicit when-to-use (user asks about pricing formula, strategy, margins, price endings, exchange rate; and immediately before every update_pricing_rule call) plus an explicit when-not-to-use block naming three alternatives and what each handles instead. The precondition that dsers_store_id comes from list_stores is also stated.

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.