Skip to main content
Glama

Apply bulk price change

apply_bulk_price_change
Destructive

Apply a bulk price change — step 2 of 2, after preview_bulk_price_change. Send the SAME rule, scope and target and the digest the preview returned, copied verbatim and never invented. The plan is recomputed from live prices and refused with CONFLICT if it no longer matches the digest (prices moved, or the rule would compound on a retry) — preview again and show the person the new numbers. Changes real prices: a selling price reaches connected channels where the owner armed price writes; a purchase cost is never published. Returns { affected, skipped }. Needs the owner's "AI may change prices in bulk" switch (Settings → Integrations → Connect AI); without it the call is refused and you should tell the person to ask the owner. Not idempotent for percent rules — never repeat a successful apply. Confirm with the person unless they asked for the change outright. Echoes the workspace.

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": {
      "digest": "<digest>",
      "rule": "<rule>",
      "scope": "<scope>"
    },
    "name": "apply_bulk_price_change"
  }
}

Input Schema

NameRequiredDescriptionDefault
ruleYesHOW prices move. The target 'cost' accepts only op 'percent'. Pick the one that matches the request: a percent change, a fixed price, a markup over cost, a discount (and its end), or the old price.
scopeYesWHICH products. Prefer a named container (category, brand, supplier, warehouse) when the person says 'all products of …' — it is read back by name in the preview. There is no free filter: a request like 'everything cheaper than 100' is not a scope; find the products first and send their ids.
digestYesThe digest returned by preview_bulk_price_change for THIS rule, scope and target — copied verbatim, never invented. If prices moved since, the apply returns CONFLICT and you must preview again.
targetNoWHICH number moves. Omit it to change the product's own selling price. Use {field:'price', currency:'EUR'} for the euro price list, {field:'cost'} for the purchase cost.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover destructive/non-idempotent/openWorld, yet the description adds material behavior: which numbers reach connected channels versus the never-published purchase cost, the CONFLICT-on-drift mechanism, the required owner switch in Settings, and the return shape { affected, skipped }. This is well beyond what the structured fields disclose.

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?

Front-loaded with purpose and the step-2 relationship, then dense but non-redundant detail. It is long, but nearly every clause (conflict handling, switch requirement, non-idempotency, confirmation) earns its place; minor tightening would help.

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 destructive, non-idempotent bulk mutation with no output schema, the description supplies the return shape, the safety gate, the failure mode, and the confirmation expectation. An agent has everything needed to call it correctly and to explain the outcome to a person.

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 description coverage is 100%, so rule/scope/target/digest are already richly documented in the schema, and the digest field itself already says 'copied verbatim, never invented.' The description reinforces the 'send the SAME ...' contract but adds little parameter meaning the schema lacks, so baseline 3 applies.

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?

Opens with a specific verb+resource and immediately positions the tool as 'step 2 of 2, after preview_bulk_price_change', so the agent can distinguish it from the sibling preview tool without opening either schema. It also states the concrete effect (changes real prices).

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?

Gives explicit when-to-use (only after a preview, sending the SAME rule/scope/target/digest), when-not (never repeat a successful apply), refusal conditions (CONFLICT on digest mismatch, missing owner switch), and the confirmation policy ('confirm with the person unless they asked for the change outright'). Rarely does a definition cover this much routing and gating.

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