Skip to main content
Glama

PriceSway

Price from a competitor pricing rule

apply_pricing_rule
Read-onlyIdempotent

Gives the price a competitor-based pricing rule produces for one product: match, or a percentage or amount below or above the cheapest, middle or highest competitor price, held between a lowest and highest markup on cost. The caller supplies the competitor prices; none are looked up.

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": {
      "yourPrice": "<yourPrice>",
      "competitorPrices": "<competitorPrices>",
      "target": "<target>",
      "mode": "<mode>"
    },
    "name": "apply_pricing_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYesMatch the target, or sit below or above it.
unitNoWhether offset is a percentage ("pct") or an amount of money ("amount").pct
offsetNoHow far below or above the target. Leave out for "match".
targetYesWhich competitor price to aim at: the cheapest, the middle (median) or the highest.
unitCostNoWhat one unit costs the store. Needed for the markup limits.
yourPriceYesThe store's current price for the product.
maxMarkupPctNoNever price over cost plus this percentage.
minMarkupPctNoNever price under cost plus this percentage.
competitorPricesYesWhat other stores charge for the same product, in the same currency as yourPrice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds genuine behavioral context beyond that: the caller must supply competitor prices because none are fetched, and the resulting price is clamped between a lowest and highest markup on cost. It stops short of describing the returned shape or any rounding/currency handling.

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?

Two sentences, front-loaded with the outcome and followed by the sourcing constraint. Dense but every clause conveys rule semantics; no filler or restatement of the title.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only calculation tool with full schema coverage, the description is essentially complete: it explains the derivation, the inputs' origin, and the clamping behavior. The only gap is that with no output schema, it does not say whether the result is a bare price or a price plus clamp/comparison details.

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?

Schema coverage is 100% and every parameter carries its own description and enums, so the schema already does the heavy lifting. The description adds conceptual linkage — that target/mode/offset define the aim point and that unitCost is what enables the markup clamps — but no format, unit or default nuances beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource ('Gives the price a competitor-based pricing rule produces for one product') and enumerates the rule space (match / pct or amount / below or above / cheapest, median, highest / markup clamps), so the agent knows exactly what computation happens. It does not name which sibling to use instead (e.g. estimate_price_change), so differentiation is inferred rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the framing of a per-product rule calculation, and 'The caller supplies the competitor prices; none are looked up' usefully scopes the situation it applies to. There is no explicit when-to-use versus estimate_price_change or calculate_profit_per_sale, and no exclusions or prerequisites 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.

Resources