Skip to main content
Glama

Validate ZPL

zpl_validate
Read-onlyIdempotent

Lint ZPL code and return structured diagnostics: unknown commands, missing ^FS, out-of-range parameters, fields outside the label boundary. Run this before zpl_preview when generating ZPL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
zplYesZPL source
dpmmNoPrinter density (8 = 203 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

TableJSON Schema
NameRequiredDescriptionDefault
ozetYes
rfidNo
alanlarNo
diagnosticsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. 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."
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already communicate read-only, idempotent, and non-destructive behaviorikuha. The description adds useful behavioral context by stating that the tool returns 'structured diagnostics' and listing what it validates, including boundary-sensitive checks, which helps set expectations beyond the title.

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?

The description is two sentences with no filler. It front-loads the core action and diagnostic types, then adds a single actionable usage instruction.

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?

Given the annotations, complete input schema, and presence of an output schema, the description covers the necessary workflow context and expected behavior. Nothing critical is missing for an agent to select and invoke the tool correctly.

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%, so the schema fully documents all four parameters. The description does not add parameter-specific meaning beyond what the schema already provides, which matches the baseline score of 3.

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?

The description uses a specific verb ('Lint') and resource ('ZPL code'), and enumerates concrete diagnostic categories such as unknown commands, missing ^FS, and boundary checks. It is clearly distinguishable from sibling validators like cpcl_validate and from zpl_preview.

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

Usage Guidelines4/5

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

The description gives explicit workflow guidance: 'Run this before zpl_preview when generating ZPL.' This tells an agent when in the generation pipeline to invoke the tool, though it does not discuss when to choose a non-ZPL validator or other diagnostic tools.

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.