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

TableJSON 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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds valuable context beyond these: the 200 KB size limit, the return of measured dimensions and physical print size, and the special PDF handling. These details help the agent anticipate constraints and output format, complementing the annotations without contradiction.

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?

Two concise sentences with no wasted words. The main action and constraints are front-loaded, and the PDF exception is stated succinctly. The structure is efficient and easy to scan.

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?

No output schema exists, so the description correctly explains the return value (ZPL, dimensions, print size). It also covers input formats, size limit, and the special PDF case. For a conversion tool with this complexity, the description provides all necessary context for correct invocation.

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 all four parameters are already described in the schema. The description adds minimal new parameter-specific detail, though it links 'chosen density' to the dpmm parameter via the output description. Since the schema carries the burden, a baseline score 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 clearly states the action (Convert), the input (an image), the output (a ZPL ^GF graphic command), and specific constraints (formats PNG/JPEG/BMP/GIF, max 200 KB). It is unambiguous and distinct from siblings like barcode_png or convert_zpl_dpi, which serve different purposes.

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 explicitly excludes PDF input, directing agents to a REST-only endpoint (/v1/graphics) for PDFs. This is a clear 'when-not' condition. For image inputs, no alternative is mentioned, but that is appropriate given no direct sibling exists for this function. The guidance is sufficient for correct selection.

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.