shopify_set_inventory
Set available inventory for one Shopify location with compare-and-set protection; preview changes via dry run before applying verified updates.
Instructions
Set available inventory at one location using compare-and-set protection: compareQuantity must equal the current available quantity. Read inventory first (shopify_get resource inventory). dryRun:true (the default) checks and previews without changing anything.
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": {
"store": "<store>",
"inventoryItemId": "<inventoryItemId>",
"locationId": "<locationId>",
"quantity": "<quantity>",
"compareQuantity": "<compareQuantity>"
},
"name": "shopify_set_inventory"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| store | Yes | ||
| dryRun | No | True (the default) returns a before/after preview without changing anything in Shopify. Pass false, after the user authorizes this store and exact change, to apply it; the tool then reads the result back. | |
| reason | No | correction | |
| quantity | Yes | ||
| locationId | Yes | ||
| idempotencyKey | No | ||
| compareQuantity | Yes | ||
| inventoryItemId | Yes |