complete_production_order
Mark a manufacturing production order Completed, exactly like the app's Complete button: deducts each BOM component's quantityActuallyUsed, adds quantityToProduce of the finished product, and logs inventory adjustments. Owner/admin/manager keys only. Rejects component stock going below zero unless allowNegative is true. Supports confirm (false = dry-run preview).
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>"
},
"name": "complete_production_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| farmId | Yes | The unique farm ID | |
| confirm | No | Set to true to commit, false for dry-run preview | |
| orderId | No | Production order document ID (or use moNumber) | |
| moNumber | No | Production order number, e.g. MO-0001 (or use orderId) | |
| allowNegative | No | Allow component stock to go below zero (default false) |