Skip to main content
Glama

Print on the P21

p21_print
Destructive

Prints labels on a Nelko P21 thermal printer, including batch rows and saved templates; run after verifying the design with p21_render.

Instructions

Print a label on the Nelko P21. This uses real labels: call it only when the user asked to print, with 1 copy unless told otherwise, after checking p21_render. rows prints one label per item. With device mock: the result contains mock_png, the image the simulated printer received.

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_print"
  }
}

Input Schema

NameRequiredDescriptionDefault
rowsNoBatch: one label per item
textNoShortcut: a plain text label (auto-sized, bold) instead of `label`. Use `\n` for line breaks.
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
copiesNo
deviceNoPrinter spec, e.g. ble:AA:BB:CC:DD:EE:FF, rfcomm:AA:BB:CC:DD:EE:FF, serial:COM5, mock: (simulated). Omit to use the server's default.
densityNoDarkness (default 15)
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.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and non-idempotency; the description adds the crucial physical consequence ("uses real labels" — consumable hardware output) and the mock-device return behavior (mock_png). It does not mention failure modes such as printer offline or out of labels, which would have earned a 5.

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 sentences with the safety gate front-loaded before the operational details. Every clause carries information an agent needs — permission check, copy count, batch meaning, mock output.

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?

With no output schema, noting that mock mode returns mock_png is genuinely useful, and the print-authorization gate is the key behavioral fact for a 9-parameter destructive tool. The remaining gap is that the mutual exclusivity of text/label/template and what a real-print success response looks like are only implied by the schema.

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 coverage is 89%, so the schema already documents nearly every parameter, including the rows/text/label/template alternatives. The description's only true additions are the per-item semantics of `rows` (already stated in the schema) and the mock_png result for `device: mock:`; otherwise it leaves format/units/exclusivity to the schema, so 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?

Specific verb and resource with the physical device named: "Print a label on the Nelko P21." It also implicitly separates itself from the sibling p21_render by requiring a render check first, so an agent can tell this is the physical-output step in the workflow.

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 gating: "call it only when the user asked to print," a default of 1 copy "unless told otherwise," and a prerequisite "after checking p21_render." This states both when to call and when not to, which is rare and directly actionable.

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