Skip to main content
Glama

MyProduct: Calculate Price by Pricing Rule

simulate_pricing_rule
Read-onlyIdempotent

[Pricing Rule] [What it does] Simulates the selling price and compare-at price that the store's Pricing Rule would compute for a DSers-managed product's mapped variants in a given destination country and cost, without writing anything back. [When to use] Use when the user wants to preview what price a Pricing Rule would produce before actually applying it, such as after a cost or destination change. [When not to use] To actually write the live price, use update_managed_store_product. To view or edit the rule itself, use get_pricing_rule/update_pricing_rule. [How to use] dsers_product_id and ship_to (2-letter country code) are required. Optionally list specific sales_product_variant_id values with an optional cost override (defaults to the mapped supplier cost); omitting the list simulates all mapped variants. Unmapped variants never appear in the results. [Side effects] None; read-only and never writes back to the product. [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_product_id": "<dsers_product_id>",
      "ship_to": "<ship_to>"
    },
    "name": "simulate_pricing_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
ship_toYesRequired two-letter destination country code used to select the applicable mapping and calculate the Pricing Rule, for example US.
dsers_product_idYesExact DSers-managed product ID copied from list_managed_store_products items[].dsers_product_id. Required.
sales_product_variant_listNoOptional sales product variants to calculate. Omit this field to calculate all mapped variants. Paste JSON example: [{"cost":"12.50","currency":"USD","sales_product_variant_id":"45382179012608"}].

Output Schema

NameRequiredDescriptionDefault
messageYesHuman-readable result summary
operationYesStable operation name
mapping_typeYesProduct mapping type
dsers_product_idYesDSers managed product ID
toolcall_response_atYesUTC timestamp when the Tool response was returned, formatted as RFC3339.
sales_product_variant_listYesCalculated prices by sales product variant

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 already declare readOnlyHint/idempotent/non-destructive, and the description still adds meaningful behavior: nothing is written back, no confirmation is needed, and unmapped variants never appear in results. The cost-override default to the mapped supplier cost is also disclosed.

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?

Content is front-loaded and well organized into labeled sections that make it scannable. The bracketed section headers are slightly ceremonial, but each sentence carries real information; nothing is redundant.

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 read-only simulation with an output schema and full schema descriptions, the definition covers purpose, routing, side effects, required inputs, and the variant-omission behavior. Nothing an agent needs to invoke it correctly is missing.

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 100%, so the schema already documents each parameter, yet the description adds selection semantics beyond it: omitting sales_product_variant_list simulates all mapped variants, and the optional cost defaults to the mapped supplier cost. It also clarifies that ship_to drives mapping selection, not just formatting.

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 (simulates) and resource (Pricing Rule selling price and compare-at price) along with the exact scope: mapped variants of a DSers-managed product for a destination country and cost. It explicitly distinguishes it from siblings that write prices or read/edit the rule.

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?

Provides explicit 'When to use' (previewing price after a cost or destination change before applying) and 'When not to use' with named alternatives (update_managed_store_product for writing, get_pricing_rule/update_pricing_rule for the rule itself). No inference is required.

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.