Skip to main content
Glama

Convert image to ZPL

image_to_zpl
Read-onlyIdempotent

Convert an image (PNG, JPEG, BMP or GIF, max 200 KB) to a ZPL ^GF graphic command. Returns the ZPL plus measured dimensions and the physical print size at the chosen density. PDF input is REST-only (/v1/graphics).

Input Schema

NameRequiredDescriptionDefault
dpmmNoTarget printer density
wrapNoWrap the ^GF in a printable ^XA...^XZ label with ^PW/^LL
ditherNoDither instead of hard threshold (photos)
image_base64YesBase64-encoded image bytes. A data:image/...;base64, prefix and line breaks are accepted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / image_base64 / description
      Previous value: -"Base64-encoded image bytes"New value: +"Base64-encoded image bytes. A data:image/...;base64, prefix and line breaks are accepted."
  2. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds real value beyond them: the 200 KB input cap, that the return includes ZPL plus measured dimensions and physical print size, and the dither-vs-threshold guidance for photos.

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 dense sentences, front-loaded with the core conversion, then constraints, then the return payload and the PDF exclusion. No filler.

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, the description usefully summarizes the return (ZPL, dimensions, physical size at chosen density). It leaves error behavior (e.g., oversize file, unsupported encoding) unstated, a minor gap for an otherwise complete definition.

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%, with descriptions for all four parameters including defaults and enum values, so the schema carries the parameter burden. The description only echoes the density-driven print-size output and adds no syntax beyond that, fitting the baseline 3.

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?

States a specific verb and resource ('Convert an image ... to a ZPL ^GF graphic command') and names accepted formats plus a size cap. The final sentence carves out PDF input as REST-only, which separates it from sibling converters like printer_language_to_zpl or barcode_png.

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?

Gives clear context: accepted formats, 200 KB limit, and the exclusion that PDFs must go through the REST endpoint. It does not explicitly say when to prefer this over zpl_preview or convert_zpl_dpi, but the input-type framing makes the intended use clear.

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.