Skip to main content
Glama

Render TSPL label

tspl_preview
Read-onlyIdempotent

Render 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tsplYesRaw TSPL/TSPL2 code
indexNoLabel index in the stream

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / index
      Added value: +{
      +  "default": 0,
      +  "description": "Label index in the stream",
      +  "type": "integer"
      +}
  2. Added

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint, idempotentHint, destructiveHint), the description adds substantial behavioral detail: it assumes 203 dpi, is an interpretation rather than actual printer validation, and explains the semantics of the response field `labels` and the `index` parameter. This gives the agent a clear model of what the tool does and its limitations.

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 and output, the second adds crucial limitations (dpi, interpretation, no physical validation), and the third clarifies the response field and parameter usage. No filler or redundancy.

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 there is no output schema, the description still conveys the return type (PNG preview) and the non-obvious `labels`/`index` semantics. Combined with annotations covering read-only and idempotent behavior, the agent has enough to invoke the tool correctly. The tool is simple enough that error handling details are not required.

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

Parameters4/5

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

Schema coverage is 100% for the two parameters, giving a baseline of 3. The description adds meaningful extra semantics: it explains that a stream can contain multiple labels ended by `PRINT`, that `labels` reports the total count, and that `index` selects which label to render. This goes beyond the terse schema descriptions.

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 opens with a specific verb-resource pair: 'Render TSPL/TSPL2 label code and return a PNG preview.' It clearly distinguishes from sibling tools by specifying the language (TSPL/TSPL2) and the preview/interpretive nature ('no physical printer validation'), which separates it from tspl_validate and other preview tools like zpl_preview or cpcl_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 provides clear context for when to use the tool: to get a visual PNG preview of TSPL code. It also signals exclusions by noting 'no physical printer validation' and 'core command subset', which alerts users against relying on it for validation or full printer behavior. However, it does not explicitly name alternative tools (e.g., tspl_validate) or state 'use this instead of X,' so it stops short of the highest level.

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.