Skip to main content
Glama

Validate TSPL

tspl_validate
Read-onlyIdempotent

Lint TSPL/TSPL2 label code and return positioned findings with severity as JSON. Checks the command set Labelixa implements from the TSPL2 manual — a clean result is not a guarantee that a specific printer accepts the job. Run this before tspl_preview; if you are not sure which language the code is, call language_detect first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tsplYesRaw TSPL/TSPL2 code

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
ozetYes
diagnosticsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "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"
      +    }
      +  },
      +  "required": [
      +    "diagnostics",
      +    "ozet"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already mark this as read-only, idempotent, and non-destructive. The description adds substantial behavioral context beyond that: the validation only covers Labelixa's implemented command set, and a clean result does not guarantee printer acceptance. It also discloses the return shape ('positioned findings with severity as JSON'), which is not in the annotations.

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 sentences, each earning its place: the first states the core action, the second adds an important scope caveat, and the third gives sequencing guidance. The primary verb and resource appear immediately, with no filler.

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?

For a single-parameter lint tool, the description is fully sufficient: it explains what is validated, the limitations of the check, the output nature, and how to order it with related tools. An output schema exists to cover detailed return values, and annotations cover the safety profile, so nothing material is missing.

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?

The schema covers 100% of parameters with a clear description ('Raw TSPL/TSPL2 code'), so the baseline is 3. The description reiterates that the input is label code and implies language ambiguity, but it does not add details like encoding, size limits, or required formatting that would elevate the score.

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 starts with a specific verb 'Lint' and a precise resource 'TSPL/TSPL2 label code', and states the output format ('positioned findings with severity as JSON'). It clearly distinguishes this from sibling validators by naming the language family and by framing the command set scope ('what Labelixa implements from the TSPL2 manual').

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?

Explicit workflow guidance is provided: 'Run this before tspl_preview' gives an ordering rule, and 'if you are not sure which language the code is, call language_detect first' routes the agent to the correct alternative. This is direct, actionable usage context beyond the schema.

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.