set_item_price_cents
Update an item's price in cents using optimistic locking: provide the expected current price to prevent stale overwrites, and optionally preview changes with dry_run.
Instructions
Modifies merchant data. Set an item's price (in cents, absolute value).
Optimistic lock: refuses the write unless the item's current price equals expected_current_price_cents (prevents stale-context overwrites). Bounds: 0 <= new_price_cents <= 100_000_000. dry_run=True previews the PUT body (still performs one read to fetch current price/name) and never writes. Requires INVENTORY_R and INVENTORY_W.
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": {
"item_id": "<item_id>",
"new_price_cents": "<new_price_cents>",
"expected_current_price_cents": "<expected_current_price_cents>"
},
"name": "set_item_price_cents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | ||
| item_id | Yes | ||
| new_price_cents | Yes | ||
| expected_current_price_cents | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||