joiva_add_barcode
Add a missing barcode (EAN/UPC) to a food in Joiva's shared catalog, by the same additive path as the scan button in the Joiva app, e.g. when the user reads the number off a pack of a product Joiva already knows ('der Skyr hat die 5700381170785'). Only an empty field is filled: an existing barcode is never overwritten, and a code that already belongs to another catalog row becomes a duplicate report for review instead of a second carrier. The check digit is verified, so a mistyped number is refused rather than stored. Nutrient values stay untouched, and the generic row without a brand ('Apfel') is refused on purpose, because that row belongs to every user. The food is identified by its catalog id (foodItemId).
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": {
"foodItemId": "<foodItemId>",
"barcode": "<barcode>"
},
"name": "joiva_add_barcode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| barcode | Yes | EAN-8, EAN-13 or UPC-A digits as printed under the barcode | |
| foodItemId | Yes | Catalog id of the food (`id` in catalog search results, `foodItemId` in a log entry) |