adjust_inventory_stock
Add (positive) or deduct (negative) stock for one General Inventory product with a required reason; writes an inventoryAdjustments record exactly like the app's Adjust Stock dialog. QuailOS stock is a single farm-wide count (no per-location stock); an optional location is recorded in the reason text. Rejects results below zero unless allowNegative is true. Supports confirm and idempotencyKey.
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": {
"farmId": "<farmId>",
"quantity": "<quantity>",
"reason": "<reason>"
},
"name": "adjust_inventory_stock"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sku | No | Product SKU (or use productId) | |
| farmId | Yes | The unique farm ID | |
| reason | Yes | Reason / note for the adjustment (required) | |
| confirm | No | Set to true to commit, false for dry-run preview | |
| location | No | Optional location label (e.g. Blossom, FBA); appended to the reason text | |
| quantity | Yes | Whole-number change: positive adds, negative deducts (non-zero) | |
| productId | No | Inventory product ID (or use sku) | |
| allowNegative | No | Allow the resulting stock to go below zero (default false) | |
| idempotencyKey | No | Unique request idempotency key (recommended) |