Generate a barcode
generate_barcodeMake one Code 128, UPC-A, EAN-13, Code 39 or ITF-14 barcode as a PNG image and/or SVG markup, with the same rules as gookit.co/barcode-generator. For UPC-A, EAN-13 and ITF-14, leave the check digit off and it is added; a wrong check digit is reported with the corrected number. One barcode per call; this tool doesn't make label sheets or PDFs.
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": {
"value": "<value>"
},
"name": "generate_barcode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | Data to encode. Code 128: letters, numbers and keyboard symbols. Code 39: uppercase letters, numbers, space and - . $ / + %. UPC-A: 11 or 12 digits. EAN-13: 12 or 13 digits. ITF-14: 13 or 14 digits. | |
| format | No | png: an image, 4x the SVG size (smaller when that would pass 2048 px). svg: markup in structuredContent.svg. both: the two. | png |
| height | No | Bar height, in px at 1x. | |
| bar_width | No | Width of the narrowest bar, in px at 1x. | |
| show_text | No | Print the value under the bars. | |
| symbology | No | code128 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| png | No | ||
| svg | No | ||
| note | No | ||
| value | Yes | What the barcode encodes, check digit included. | |
| svg_size | Yes | ||
| next_step | No | One line naming the Gookit product for the next step, such as printing labels. Not part of the result. | |
| symbology | Yes | ||
| check_digit_added | Yes |