Validate ZPL
zpl_validatePass/fail lint for ZPL — machine-readable diagnostics with line/column, code and severity: unknown commands, missing ^FS, out-of-range parameters, fields outside the label. Fast; run it before zpl_preview whenever you generate or edit ZPL. For a human-readable report with a score, use explain_zpl instead.
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": {
"zpl": "<zpl>"
},
"name": "zpl_validate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| zpl | Yes | ZPL source, non-empty (^XA...^XZ) | |
| dpmm | No | Printer density in dots per mm: 6, 8, 12 or 24 (8 = 203 dpi, 12 = 300 dpi, 24 = 600 dpi). The boundary check measures against it — pass the real value. | |
| width_in | No | Label width in inches. Fields outside it are reported, so a wrong size makes that finding wrong. | |
| height_in | No | Label height in inches. Same as width_in: the boundary check depends on it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rfid | No | ||
| fields | No | ||
| summary | Yes | ||
| diagnostics | Yes |