Skip to main content
Glama

Validate ZPL

zpl_validate
Read-onlyIdempotent

Pass/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.

Input Schema

NameRequiredDescriptionDefault
zplYesZPL source, non-empty (^XA...^XZ)
dpmmNoPrinter 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_inNoLabel width in inches. Fields outside it are reported, so a wrong size makes that finding wrong.
height_inNoLabel height in inches. Same as width_in: the boundary check depends on it.

Output Schema

NameRequiredDescriptionDefault
rfidNo
fieldsNo
summaryYes
diagnosticsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / dpmm / description
      Previous value: -"Printer density (8 = 203 dpi). The boundary check measures against it — pass the real value."New value: +"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."
    • changedInput schema / properties / zpl / description
      Previous value: -"ZPL source"New value: +"ZPL source, non-empty (^XA...^XZ)"
  2. Changed7 schema fields changed
    • removedOutput schema / properties / alanlar
      Removed value: -{
      -  "items": {
      -    "properties": {
      -      "line": {
      -        "type": "integer"
      -      },
      -      "x": {
      -        "type": "integer"
      -      },
      -      "y": {
      -        "type": "integer"
      -      }
      -    },
      -    "type": "object"
      -  },
      -  "type": "array"
      -}
    • removedOutput schema / properties / diagnostics / items / properties / mesaj
      Removed value: -{
      -  "description": "Human-readable message in the requested language",
      -  "type": "string"
      -}
    • addedOutput schema / properties / diagnostics / items / properties / message
      Added value: +{
      +  "description": "Human-readable message in the requested language",
      +  "type": "string"
      +}
    • addedOutput schema / properties / fields
      Added value: +{
      +  "items": {
      +    "properties": {
      +      "line": {
      +        "type": "integer"
      +      },
      +      "x": {
      +        "type": "integer"
      +      },
      +      "y": {
      +        "type": "integer"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • removedOutput schema / properties / ozet
      Removed value: -{
      -  "properties": {
      -    "error": {
      -      "type": "integer"
      -    },
      -    "info": {
      -      "type": "integer"
      -    },
      -    "toplam": {
      -      "type": "integer"
      -    },
      -    "warning": {
      -      "type": "integer"
      -    }
      -  },
      -  "required": [
      -    "toplam",
      -    "error",
      -    "warning",
      -    "info"
      -  ],
      -  "type": "object"
      -}
    • addedOutput schema / properties / summary
      Added value: +{
      +  "properties": {
      +    "error": {
      +      "type": "integer"
      +    },
      +    "info": {
      +      "type": "integer"
      +    },
      +    "total": {
      +      "type": "integer"
      +    },
      +    "warning": {
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "total",
      +    "error",
      +    "warning",
      +    "info"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "diagnostics",
      -  "ozet"
      -]New value: +[
      +  "diagnostics",
      +  "summary"
      +]
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "alanlar": {
      +      "items": {
      +        "properties": {
      +          "line": {
      +            "type": "integer"
      +          },
      +          "x": {
      +            "type": "integer"
      +          },
      +          "y": {
      +            "type": "integer"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "diagnostics": {
      +      "items": {
      +        "properties": {
      +          "code": {
      +            "description": "Stable diagnostic code, e.g. ZPL0002",
      +            "type": "string"
      +          },
      +          "col": {
      +            "type": "integer"
      +          },
      +          "end_col": {
      +            "type": "integer"
      +          },
      +          "end_line": {
      +            "type": "integer"
      +          },
      +          "line": {
      +            "type": "integer"
      +          },
      +          "mesaj": {
      +            "description": "Human-readable message in the requested language",
      +            "type": "string"
      +          },
      +          "message_key": {
      +            "description": "i18n key for the message",
      +            "type": "string"
      +          },
      +          "severity": {
      +            "enum": [
      +              "error",
      +              "warning",
      +              "info"
      +            ],
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "severity",
      +          "line",
      +          "col"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "ozet": {
      +      "properties": {
      +        "error": {
      +          "type": "integer"
      +        },
      +        "info": {
      +          "type": "integer"
      +        },
      +        "toplam": {
      +          "type": "integer"
      +        },
      +        "warning": {
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "toplam",
      +        "error",
      +        "warning",
      +        "info"
      +      ],
      +      "type": "object"
      +    },
      +    "rfid": {
      +      "items": {
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "diagnostics",
      +    "ozet"
      +  ],
      +  "type": "object"
      +}
  4. Changed3 schema fields changed
    • addedInput schema / properties / dpmm / description
      Added value: +"Printer density (8 = 203 dpi). The boundary check measures against it — pass the real value."
    • addedInput schema / properties / height_in / description
      Added value: +"Label height in inches. Same as width_in: the boundary check depends on it."
    • addedInput schema / properties / width_in / description
      Added value: +"Label width in inches. Fields outside it are reported, so a wrong size makes that finding wrong."
  5. First observed

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly, idempotent, non-destructive, so the safety profile is covered; the description adds real value on top by describing the output shape (line/column, code, severity) and the speed characteristic. It stops short of saying what it does not check (e.g., no auto-fix, no rendering preview), which would complete the picture.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight clauses with zero padding: what it returns, why to run it, and the alternative. The valuable routing information is front-loaded and the trailing alternative sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present and full schema coverage, the description need not explain return values or parameter formats; it covers the remaining gaps (purpose, placement in the workflow, sibling choice) completely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the schema already explains dpmm, width_in and height_in in detail, including defaults and the boundary-check dependency. The description adds nothing about parameters, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Pass/fail lint for ZPL') and enumerates the diagnostic classes it produces (unknown commands, missing ^FS, out-of-range params, fields outside the label). It explicitly distinguishes itself from explain_zpl, so an agent can tell the two apart without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit sequencing rule ('run it before zpl_preview whenever you generate or edit ZPL') and names the alternative for the human-readable case ('use explain_zpl instead'). Both the when-to-use and the when-not-to-use are covered.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.