Skip to main content
Glama

API Keg — Barcode, QR & Label Sheet Engine

Generate Barcode or QR Code (SVG + PNG)

generate_barcode
Read-onlyIdempotent

Encodes a single QR Code (ISO 18004 v1-v10), Code-128, GS1-128, EAN-13, or UPC-A symbol, validating/computing GS1 check digits and returning both crisp vector SVG and lossless binary base64 PNG. Pricing: $0.001 USD per generated barcode or QR symbol (SVG + PNG) (x402 instant micropayment). Pass ?dry_run=true on REST to validate schema free.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "format": "<format>",
      "value": "<value>"
    },
    "name": "generate_barcode"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelNoOptional custom human-readable caption override beneath the barcode.
scaleNoPixels per module (defaults to 4 for QR and 2 for 1D linear barcodes).
valueYesPayload to encode (UTF-8 string/URL for QR; printable ASCII for code128; '(01)...' AI string for gs1_128; 12/13 digits for ean13; 11/12 digits for upca).
formatYesSymbology format: 'qr' (ISO 18004 v1-v10 UTF-8), 'code128' (Set B/C auto-packed), 'gs1_128' (GS1 Application Identifiers with FNC1), 'ean13' (GTIN-13), or 'upca' (GTIN-12).
barHeightNoBar height in pixels for 1D linear barcodes (defaults to 72).
quietZoneNoQuiet zone margin in modules (defaults to ISO standard: 4 for QR, 9-11 for 1D).
backgroundNoBackground hex color (#RGB or #RRGGBB, default '#FFFFFF').
foregroundNoForeground bar/module hex color (#RGB or #RRGGBB, default '#000000').
includeTextNoRender human-readable text beneath symbol (defaults to true for 1D, false for QR).
errorCorrectionNoQR Code Reed-Solomon error correction level: L (~7%), M (~15%), Q (~25%), H (~30%).M

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/destructiveHint=false, so the safety profile is covered. The description goes beyond that by disclosing cost ($0.001 USD per symbol via x402 micropayment), the dual SVG + base64 PNG return, and free dry-run validation — material facts an agent needs before invoking a paid endpoint.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core capability and the pricing/dry-run caveat are front-loaded in two compact sentences. The pricing sentence is parenthetically dense but every clause (price, unit, payment mechanism, dry-run escape hatch) carries decision-relevant information.

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 does the necessary work of naming the return artifacts (vector SVG plus lossless base64 PNG) and flagging the paid, micropayment nature of the call. Exact response field names and envelope structure remain unspecified, which is the only real gap for a 10-parameter tool.

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 every one of the ten parameters is already documented with types, defaults, ranges, and enum meanings. The description adds only the GS1 check-digit computation note and the dry_run REST flag; it does not deepen per-parameter meaning, so the baseline 3 applies.

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 opens with a specific verb ('Encodes') and enumerates the exact symbologies supported (QR ISO 18004, Code-128, GS1-128, EAN-13, UPC-A). It also states the 'single symbol' scope and both output artifacts, which implicitly separates it from the sibling generate_label_sheet that produces sheets.

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

Usage Guidelines3/5

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

It gives one actionable routing hint: pass ?dry_run=true on REST to validate the schema for free, and it implies GS1 check-digit validation is part of encoding. However, it never explicitly contrasts this tool with generate_label_sheet or validate_gtin_check_digit, so the agent must infer when to pick each.

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