Skip to main content
Glama

set_prices_by_margin

Set each variant's price to hit a target profit margin off its OWN cost: price = cost / (1 - margin). Reads per-variant production cost (populated after the fulfillment sync), applies a per-variant price, then re-syncs connected channels. Use this instead of one flat price when costs tier by size (larger sizes cost more, so a single price gives a different margin per size — and can go negative on the biggest). Requires store_uuid (cost lives on the store-products list, not product detail).

[#54cd6b]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
marginYesTarget profit margin as a fraction of the selling price, e.g. 0.15 = 15%.
workspaceNo
store_uuidYesThe store the product is in — needed to read per-variant cost and to re-sync channels.
product_uuidYes
also_update_channelsNoDefault true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only provide openWorldHint=true, so the description carries most of the behavioral burden and does so well: it discloses that cost is read per-variant, a price is written, then connected channels are re-synced (a side effect), plus the fulfillment-sync prerequisite. It stops short of stating reversibility or what happens to manually-set prices.

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?

The action and formula are front-loaded, followed by prerequisite, rationale, and the requires note. Every sentence earns its place, though the trailing '[#54cd6b]' artifact adds noise and the single paragraph is somewhat dense.

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 mutation tool with no output schema and thin annotations, the description covers the key side effect (channel re-sync), the cost prerequisite, and the required identifier reason. It could say more about failure modes when cost is missing or channel overwrite behavior, but it is largely sufficient.

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 60% schema coverage, the description adds real meaning: it defines the margin formula, explains why store_uuid is required (cost lives on the store-products list, not product detail), and ties the channel re-sync to also_update_channels. product_uuid and workspace remain unexplained here.

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 names a specific verb+resource (set each variant's price) and goes further by stating the exact formula, price = cost / (1 - margin). This distinguishes it from flat-price siblings like cascade_price_change because the per-variant, cost-driven scope is explicit.

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?

It gives an explicit when-to-use rule ('Use this instead of one flat price when costs tier by size') and explains the consequence of not doing so (single price gives different margins per size, can go negative). It also states the prerequisite that cost is populated after the fulfillment sync.

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