Make a barcode or QR code
generate_barcodeDraw a barcode or QR code and return it as SVG (for print) and as a PNG preview. format: EAN13, EAN8, UPC (UPC-A), ITF14, CODE128, CODE39 or QR. value: the digits or text (QR: any text or URL up to 256 characters). Colours as #rrggbb; keep the bars dark on a light background so scanners can read it.
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": {
"format": "<format>",
"value": "<value>"
},
"name": "generate_barcode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bg | No | Background colour | #ffffff |
| fg | No | Bar colour | #0a0a0b |
| text | No | Print the number under 1D barcodes | |
| value | Yes | ||
| format | Yes | ||
| height | No | Bar height (1D barcodes) | |
| png_width | No | Width of the PNG preview in pixels |