Render TSPL label
tspl_previewRender TSPL/TSPL2 label code and return a PNG preview. The preview assumes 203 dpi and is an interpretation of the TSPL manual covering a core command subset — no physical printer validation. labels in the response is the TOTAL number of labels the stream prints (a stream may contain several, each ended by PRINT); pass index to render a different one.
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": {
"tspl": "<tspl>"
},
"name": "tspl_preview"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tspl | Yes | Raw TSPL/TSPL2 code | |
| index | No | Label index in the stream |