Skip to main content
Glama

Generate a barcode

generate_barcode

Render barcodes in Code 128, EAN-13, UPC-A, and other formats. Returns a 24-hour link, dimensions, and the image.

Instructions

Renders a barcode: Code 128, Code 39, Code 93, EAN-13, EAN-8, UPC-A, UPC-E, ITF-14 or Codabar. Returns a link valid for 24 hours, the dimensions and the image itself.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNo`code128` (printable ASCII, up to 80 characters), `code39` (digits, capitals and `- . $ / + %`), `code93`, `ean13` (12 digits, or 13 with the check digit), `ean8` (7 or 8 digits), `upca` (11 or 12 digits), `upce` (6 to 8 digits), `itf14` (13 or 14 digits), `codabar` (a start and stop letter A to D around digits).code128
colorNoBar colour as six hex digits.000000
scaleNoWidth of the narrowest bar in pixels, 1 to 10.
formatNo`png` (default), `svg` or `jpg`.png
heightNoBar height in pixels, 20 to 300.
bgcolorNoBackground colour as six hex digits.ffffff
contentYesThe value to encode. Each symbology has its own alphabet and length, listed under the `type` parameter.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare openWorldHint=true, non-read-only, non-idempotent and non-destructive. The description adds genuinely non-obvious behavior: the returned link expires in 24 hours and the response includes dimensions plus the image itself. That expiry detail meaningfully affects how an agent should handle the result.

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 clauses, zero filler, and the core action is front-loaded before the supported types. Nothing would be lost by keeping it exactly as written.

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 7-parameter tool with no output schema, the description covers the action, the full symbology set, and the return shape (link with expiry, dimensions, image). The only gap is the absence of any when-to-use guidance relative to generate_qr_code.

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% and every parameter (type alphabets, color, scale, format, height, bgcolor, content) is fully documented in the schema. The description adds nothing beyond the schema, so the baseline 3 applies.

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?

States a specific verb (Renders) and resource (a barcode) and enumerates all nine supported symbologies, which implicitly separates it from the sibling generate_qr_code. It never names that sibling or explicitly contrasts the two, but the symbology list makes the scope unambiguous.

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

Usage Guidelines2/5

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

There is no guidance on when to choose this tool over generate_qr_code or when a barcode is inappropriate. The only orienting statement is the 24-hour link lifetime, which is output behavior rather than usage context.

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