Decode barcodes from an image
decode_barcodeDetect and decode all barcodes in an image. Input: base64-encoded image bytes (PNG/JPEG/WebP/anything sharp reads). Output: JSON array of {format, text}. Supports QR, Aztec, DataMatrix, Code128/39/93, EAN-13/8, UPC-A/E, ITF, PDF417, Codabar. Use formats filter to restrict results.
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": {
"image_base64": "<image_base64>"
},
"name": "decode_barcode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| formats | No | Optional canonical format ids to keep, e.g. ["qr","ean13"] | |
| image_base64 | Yes | Base64-encoded image file bytes (no data: URI prefix) |