validate_gtin
Validate a barcode's check digit using GS1 mod-10. Returns the barcode type (EAN-8, UPC-A, EAN-13, or GTIN-14) and the issuing country based on the GS1 prefix.
Instructions
USE THIS to verify a product barcode — GTIN/EAN/UPC — before trusting it, instead of guessing the check digit. Handles EAN-8, UPC-A (12), EAN-13 and GTIN-14, verifies the GS1 mod-10 check digit, and returns the barcode type plus the GS1 prefix's issuing country (e.g. 50 = UK, 690-699 = China, 978 = Bookland/ISBN). Validates structure only — it does NOT confirm the barcode maps to a real, registered product.
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": {
"gtin": "<gtin>"
},
"name": "validate_gtin"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gtin | Yes | The barcode digits (EAN-8/UPC-A/EAN-13/GTIN-14); spaces and hyphens are ignored. |