grocy_barcode_lookup
Look up product details by barcode using an external source. Set add=true with confirm to create the product in Grocy.
Instructions
External barcode lookup. GET /api/stock/barcodes/external-lookup/{barcode}. add=true also creates the product and needs confirm.
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": {
"barcode": "<barcode>"
},
"name": "grocy_barcode_lookup"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| add | No | When true, Grocy adds the product on a successful lookup. That is a write. | |
| barcode | Yes | ||
| confirm | No | Set to the boolean true to execute the write. Omit this field for a dry-run preview. false and the string true are rejected. |