Skip to main content
Glama

Barcode Generator

Generate barcode

generate_barcode
Read-onlyIdempotent

Encode a value into any of 35 barcode and QR symbologies and return the rendered image. Supports QR Code, Data Matrix, PDF417, Aztec, EAN-13, UPC-A, Code 128/39/93, ITF-14 and more. Returns SVG markup by default (or a data: URI when asked), plus a link to the online generator pre-filled with the same value. Use "type" with the canonical name from list_barcode_types; common spellings like "qr" or "code-128" are accepted. Linear formats such as EAN-13 enforce strict charset and length rules and will fail on invalid input.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesBarcode symbology, e.g. "Qrcode", "Ean13", "Code128", "Datamatrix", "Pdf417", "gs1-128".
valueYesThe data to encode — a URL, product number, tracking code, phone number, Wi-Fi string, etc.
formatNoOutput encoding. "svg" returns XML markup; "data-uri" returns a ready-to-embed data: URL.svg
heightNoSymbol height in pixels (linear formats mainly).
captionNoOptional human-readable text drawn under the symbol. Defaults to the value itself.
showTextNoDraw the human-readable caption under the symbol.
errorCorrectionNoQR error-correction level. Higher levels survive more damage but produce a denser symbol. Ignored by linear formats.M

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations cover the safety profile (readOnly, idempotent, non-destructive), so the bar is lower, yet the description still adds real context: default SVG output vs data: URI, an accompanying pre-filled link, and that linear symbologies fail on invalid input.

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?

Four front-loaded sentences, none wasted: capability, supported formats, return shape, then the type-value and validation caveats. Information density is high 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 compensates by describing exactly what is returned (SVG markup or data: URI plus an online-generator link), and it covers type sourcing and validation limits. An agent has everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/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, but the description adds meaning beyond the schema by pointing at list_barcode_types for canonical 'type' values and noting lenient spellings like "qr" or "code-128" are accepted, plus the failure behavior tied to strict charsets.

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+resource ('Encode a value into any of 35 barcode and QR symbologies and return the rendered image') and enumerates supported formats, which clearly distinguishes it from the sibling read-only tools get_barcode_type and list_barcode_types.

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?

Explicitly routes the agent to list_barcode_types for canonical type names and warns that linear formats like EAN-13 enforce strict charset/length rules. It lacks an explicit when-not-to-use statement, but the context is 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.

Resources