Preview a label
p21_renderRender a label to a print-accurate preview PNG without printing. Returns the image, warnings to fix, and element boxes with chosen font sizes.
Instructions
Render a label to a preview PNG exactly as it will print, without printing. Returns the image, warnings (fix them) and each element's box and chosen font size.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "p21_render"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Shortcut: a plain text label (auto-sized, bold) instead of `label`. Use `\n` for line breaks. | |
| debug | No | Outline element boxes with their index | |
| label | No | Nelko P21 label. Coordinates are printer dots (203 dpi, ~8 dots/mm) on the design canvas. Landscape 14x40 mm canvas = 284 x 96 dots (x across the label length, y across the 12 mm printable tape width). Canvas width = round(length_mm * 7.1) for other lengths. Output is pure black/white. | |
| media | No | Label roll size for `text` (ignored with `label`) | 14x40 |
| scale | No | Preview magnification | |
| template | No | Name of a saved template (see p21_list_templates) instead of `label`; fill its {{variables}} with `variables`/`rows` | |
| variables | No | Values for {{name}} placeholders |