Skip to main content
Glama

generate barcode

generate_barcode
Read-only

Generate a barcode or QR code as SVG or PNG: QR, DataMatrix, PDF417, Code 128, Code 39, EAN-13, EAN-8, UPC-A, ISBN-13, ITF and GS1-128. EAN/UPC/ISBN check digits are computed (or verified, never silently replaced). QR and DataMatrix support colours, square/rounded/dot styles and (QR) a centre logo from an https URL. Every format is verified scannable. Returns SVG text or base64 PNG plus a data URI ready to embed in HTML, PDF or labels. Paid ($0.001, x402).

Input Schema

NameRequiredDescriptionDefault
ecNoQR error correction level (H when a logo is used)
textYesData to encode (URL, text, digits for EAN/UPC/ISBN...)
typeNoBarcode format
colorNoForeground colour #RRGGBB
scaleNoSize: pixels per module (2D) or bar-width step (1D); default 4 (SVG) / 8 (PNG)
styleNoModule style (qrcode, datamatrix)
formatNoOutput image format
logo_urlNoQR only: https URL of a PNG/JPEG/WebP logo (max 200 KB) placed in the centre
height_mmNoBar height for linear barcodes, in mm
backgroundNoBackground colour #RRGGBB
include_textNoPrint the human-readable text under linear barcodes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare a read-only and open-world operation, and the description adds substantial behavioral context beyond that: check-digit handling, logo constraints, scannability verification, output format (SVG/base64 PNG plus data URI), and a paid x402 cost. This is rich disclosure without contradicting 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 dense but front-loaded with the core purpose, then layers format support, special features, verification behavior, return format, and cost. Every sentence contributes useful information for this 11-parameter tool, with no filler.

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?

With no output schema, the description fills the gap by specifying return values (SVG text, base64 PNG, data URI) and verification behavior. Combined with full schema coverage and annotations, an agent has everything needed to invoke the tool correctly.

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 schema already documents all 11 parameters thoroughly. The description reinforces some parameter behavior (e.g., QR/DataMatrix colour and style options, logo URL requirements, check-digit logic) but adds little semantic meaning beyond what the schema provides, warranting 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?

The description states a specific verb and resource: generate a barcode or QR code. It enumerates supported formats and output types, making it clearly distinguishable from sibling read_barcode and other tools.

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 gives clear context for generation tasks (formats, output options, payment) and implicitly contrasts with reading barcodes via the sibling name, but it does not explicitly state when not to use it or name alternatives like read_barcode or lookup_product_code.

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.

Resources