Skip to main content
Glama
apparelhub-mcp

apparelhub-mcp

Official

Set prices by target margin

set_prices_by_margin
Destructive

Sets each product variant’s price from its own cost to achieve a target profit margin, then re-syncs connected sales channels. Use per-variant pricing when costs vary by size.

Instructions

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]

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": {
      "product_uuid": "<product_uuid>",
      "store_uuid": "<store_uuid>",
      "margin": "<margin>"
    },
    "name": "set_prices_by_margin"
  }
}

Input 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 observedv0.15.2

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructive and open-world behavior; the description adds the concrete side effects behind that hint — it reads per-variant cost, overwrites each variant's price, and re-syncs connected channels. It stops short of saying whether manually set prices or overrides are lost and what happens when cost is missing or zero.

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 formula and the core distinction are front-loaded, and most sentences carry weight. The trailing artifact '[#54cd6b]' is stray noise that undercuts an otherwise tight single paragraph.

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 destructive, open-world mutation with five parameters and no output schema, the description supplies the key preconditions, the computation, and the post-write re-sync. Remaining gaps (behavior when cost is absent, reversibility, return value) are secondary for a tool whose annotations already flag destructiveness.

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 explains why store_uuid is required (cost lives on the store-products list, not product detail) and what margin means relative to cost versus selling price. product_uuid and workspace remain unexplained, but one is self-evident and the other optional.

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 the resource (each variant's price), the specific mechanism (target margin off its own cost) and even the formula price = cost / (1 - margin), and explicitly contrasts it with a single flat price for all variants.

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

Usage Guidelines4/5

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

It gives a clear selection rule: use this rather than one flat price when costs tier by size, explaining that a single price yields different margins per size and can go negative. It also states a prerequisite (per-variant cost exists only after the fulfillment sync) but names no concrete sibling tool to route to.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools