Skip to main content
Glama

Label Compile

label_compile
Read-only

Compile label definitions into printer commands (TSC, ZPL, EPL) by submitting width, language, and elements for thermal label printing.

Instructions

Label Compile. Compile a label to printer commands (tsc, zpl, epl, …). POST width, language, and elements. Text uses content and size (1-10), not text or fontSize. No barcode element. Example: {"width":40,"height":30,"unit":"mm","language":"zpl","element… Credit cost: 3 credits per call.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "width": "<width>",
      "elements": "<elements>",
      "language": "<language>"
    },
    "name": "label_compile"
  }
}

Input Schema

NameRequiredDescriptionDefault
dpiNoPrinter DPI. Default 203.
gapNoGap between labels in mm. Ignored for receipts.
unitNoMeasurement unit for width and height. Default mm. Use mm unless you are working in printer dots. Allowed values: mm, inch, dot. Default: "mm".
speedNoPrint speed, 1-18.
widthYesLabel width. Required. Default unit is mm. Example: 40. Do not send query instead of width.
copiesNoNumber of copies. Minimum 1.
fieldsNoComma-separated list of fields to keep in the response, with dot notation for nested fields (e.g. name,location.city). Does not change the credit cost.
heightNoLabel height in the same unit. Example: 30. Omit for receipt / continuous mode.
densityNoPrint darkness, 0-15.
printerNoPrinter profile id (tsc-te210, zebra-zd420, …).
elementsYesRequired array. Text items need type=text, content, and size (1-10 magnification). Do not use text, fontSize, or type=barcode. Positions x/y are in dots. Example item: {"type":"text","content":"Order: 1042","x":10,"y":10,"size":2}.
languageYesRequired printer language. Example: zpl or tsc. Do not omit. Allowed values: tsc, zpl, epl, cpcl, dpl, sbpl, escpos, starprnt, ipl. Default: "tsc".
directionNoPrint direction. 0 = normal, 1 = reversed. Default: 1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnlyHint=true, destructiveHint=false), so the bar is lower. The description adds two genuinely non-schema facts: a credit cost of 3 per call and the restriction that barcode elements cannot be included, but it says nothing about output format, size limits, or what happens when the payload is invalid.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is short and the credit cost is front-loadable, but "Label Compile." merely repeats the title and the example JSON is cut off mid-key, leaving a dangling, unusable fragment. Density is reasonable; execution is sloppy.

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 13-parameter tool with no output schema, the description covers the three required fields, the element shape, and the cost, which is enough to make a correct first call. The missing piece is routing guidance against the many label_* siblings and any note on what the returned command stream looks like.

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 100%, so the baseline is 3. The description restates the element conventions (content and size 1-10, no text/fontSize, x/y in dots) that the schema already documents, and its example payload is visibly truncated at "element…", so it adds little usable meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Compile a label to printer commands (tsc, zpl, epl, …)" gives a specific verb plus the exact output artifact, which separates it from label_render/label_view siblings that produce images. It stops short of naming those siblings explicitly, so the boundary is inferred rather than stated.

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

Usage Guidelines3/5

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

The description lists required inputs and warns that barcode elements are unsupported, which implicitly tells the agent when this tool is appropriate. It never states when to prefer label_convert, label_render, or label_parse instead, and no prerequisites are given beyond the credit cost.

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