Generate barcode
generate_barcodeEncode text into barcode images in formats like Code128, EAN, DataMatrix, and PDF417. Returns a PNG for immediate use.
Instructions
Generate a barcode image in various formats. Returns a PNG image. Supported formats: code128, code39, code93, ean13, ean8, upca, upce, itf14, interleaved2of5, isbn, issn, ismn, datamatrix, pdf417, azteccode, gs1-128, pharmacode, codabar, msi, plessey, postnet, onecode, royalmail, code11, code49.
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": {
"text": "<text>",
"format": "<format>"
},
"name": "generate_barcode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Data to encode in the barcode | |
| scale | No | Scaling factor (default: 3) | |
| format | Yes | Barcode format to generate | |
| height | No | Bar height in mm (default: 10, ignored for 2D formats) | |
| include_text | No | Show human-readable text below barcode (default: true) |