Skip to main content
Glama

Preview a label

p21_render
Read-only

Render a label to a print-accurate preview PNG without printing. Returns the image, warnings to fix, and element boxes with chosen font sizes.

Instructions

Render a label to a preview PNG exactly as it will print, without printing. Returns the image, warnings (fix them) and each element's box and chosen font size.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "p21_render"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNoShortcut: a plain text label (auto-sized, bold) instead of `label`. Use `\n` for line breaks.
debugNoOutline element boxes with their index
labelNoNelko P21 label. Coordinates are printer dots (203 dpi, ~8 dots/mm) on the design canvas. Landscape 14x40 mm canvas = 284 x 96 dots (x across the label length, y across the 12 mm printable tape width). Canvas width = round(length_mm * 7.1) for other lengths. Output is pure black/white.
mediaNoLabel roll size for `text` (ignored with `label`)14x40
scaleNoPreview magnification
templateNoName of a saved template (see p21_list_templates) instead of `label`; fill its {{variables}} with `variables`/`rows`
variablesNoValues for {{name}} placeholders

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Read-only and closed-world annotations already cover the safety profile, and the description adds useful behavioral detail: it returns the preview PNG, warnings to fix, and per-element box/font-size metadata. It does not specify the exact image delivery format, but it adds substantial context beyond 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?

The description is two tight sentences, front-loaded with the core action and immediately followed by return-value details. Every sentence earns its place with no redundant restatement.

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

Completeness4/5

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

For a complex nested-schema tool with no output schema, the description adequately states the return contents: image, warnings, element boxes, and chosen font sizes. It does not mention the text/template/label input modes, but those are fully documented in the schema, leaving only a minor contextual gap.

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 detailed parameter descriptions in the schema already do the heavy lifting. The tool description does not add new semantic meaning for parameters such as label, text, template, scale, or debug, so the baseline of 3 is appropriate.

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 states a specific verb and resource: 'Render a label to a preview PNG.' It also explicitly distinguishes preview from actual printing with 'exactly as it will print, without printing,' making the tool's role clear against the likely sibling p21_print.

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 phrase 'without printing' clearly signals when to use this tool: to preview before printing. However, the description does not explicitly name p21_print as the alternative or state when not to use this tool, so it stops short of full when/when-not guidance.

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