Skip to main content
Glama

Agent Data Tools: Utilities

Barcode generator: Code 128 or EAN-13 as SVG

barcode
Read-only

Generate a barcode as an SVG image: Code 128 for any printable ASCII text (switching to the compact numeric set for runs of digits, with the mod-103 check symbol), or EAN-13 for 12 or 13 digits (the check digit is computed or verified). Set bar width and height and whether to print the text below. Returns the SVG and a data URL ready for an tag. Use for shipping labels, product codes, tickets or inventory; for QR codes use qr. Example: text=AGENT-12345. Price $0.01/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not 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": {
      "text": "<text>"
    },
    "name": "barcode"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesWhat to encode: ASCII text for Code 128, or 12-13 digits for EAN-13
typeNocode128 (default) or ean13
labelNotrue (default) to print the text below the bars
widthNoModule (narrowest bar) width in pixels, 1-6 (default 2)
heightNoBar height in pixels, 20-300 (default 80)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / height / maximum
      Previous value: -9007199254740991New value: +300
    • changedInput schema / properties / height / minimum
      Previous value: --9007199254740991New value: +20
    • changedInput schema / properties / width / maximum
      Previous value: -9007199254740991New value: +6
    • changedInput schema / properties / width / minimum
      Previous value: --9007199254740991New value: +1
  2. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so safety is covered; the description goes further by disclosing cost ($0.01/call via x402 USDC or card key, first 10 free, failed calls free) and that repeats are charged because idempotentHint is false. That pricing/repeat-charge context is genuinely useful beyond the annotations, though the 'reads or computes only and changes nothing' clause largely restates readOnlyHint.

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?

Front-loaded with the core action and formats, then use cases, an example, and billing. Dense but nearly every sentence carries information; the only mild redundancy is the closing 'reads or computes only and changes nothing' echoing readOnlyHint and the earlier pricing sentence.

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 correctly states what is returned (the SVG and a data URL usable in an <img> tag). Combined with format rules, sizing, label behavior, and billing, an agent has everything needed to invoke this five-parameter tool 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 behavioral meaning to 'text': Code 128 accepts printable ASCII and switches to the compact numeric set for digit runs with a mod-103 check symbol, while EAN-13 needs 12–13 digits with the check digit computed or verified. It also confirms the label/width/height controls in prose, exceeding what the schema alone conveys.

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 and resource ('Generate a barcode as an SVG image') and enumerates the two supported symbologies with their input rules. It also explicitly distinguishes itself from the 'qr' sibling, so an agent can pick correctly without opening schemas.

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

Usage Guidelines5/5

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

Gives concrete use cases (shipping labels, product codes, tickets, inventory) and an explicit exclusion with an alternative: 'for QR codes use qr'. That is a when-to-use plus a when-not-to-use routing rule.

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