Decode barcode/QR code
decode_imageDecode barcodes and QR codes from a base64-encoded image. Returns all codes found, supports QR, EAN, UPC, Code 128, and more, even from noisy photos.
Instructions
Decode barcodes and QR codes from a base64-encoded image. Returns all codes found. Supports QR, EAN-13, EAN-8, UPC-A, UPC-E, Code 128, Code 39, Code 93, ITF, Codabar, and PDF 417. Handles noisy real-world photos by trying multiple preprocessing approaches.
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": "<image>"
},
"name": "decode_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | Base64-encoded image data (PNG, JPEG, etc.) | |
| format_hint | No | Expected barcode format. If omitted, all formats are tried. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| codes | Yes | All barcodes/QR codes found in the image |