Skip to main content
Glama

Barcode Tools (decode, render, GTIN validate)

Decode barcodes from an image

decode_barcode

Detect and decode all barcodes in an image. Input: base64-encoded image bytes (PNG/JPEG/WebP/anything sharp reads). Output: JSON array of {format, text}. Supports QR, Aztec, DataMatrix, Code128/39/93, EAN-13/8, UPC-A/E, ITF, PDF417, Codabar. Use formats filter to restrict results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatsNoOptional canonical format ids to keep, e.g. ["qr","ean13"]
image_base64YesBase64-encoded image file bytes (no data: URI prefix)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the input (base64 image bytes) and output (JSON array of {format, text}), and lists supported formats. However, it does not disclose behavior on edge cases (e.g., no barcode found, invalid image, performance limits) or any side effects, which leaves some uncertainty for an agent.

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 three concise sentences, front-loaded with the core purpose and followed by input/output and format details. There is no redundant or filler language; every sentence contributes to understanding how to use the tool.

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?

Given the low complexity (2 params, 1 required) and the absence of an output schema, the description adequately explains the return format (JSON array of {format, text}) and lists supported formats. It does not mention error handling or empty results, but for a straightforward decode tool, this is sufficient. The lack of annotations is compensated by the clear input/output specification.

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 description coverage is 100%, so both parameters are already documented in the schema. The description adds value beyond the schema by listing the specific supported barcode formats (e.g., QR, EAN-13) and clarifying that the formats filter restricts results to those canonical ids. This enriches the meaning of the formats parameter and the input format expectations.

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 'Detect and decode all barcodes in an image', clearly specifying the verb (detect and decode), the resource (barcodes in an image), and the input format. It explicitly lists supported barcode types, and the sibling tools (list_formats, render_barcode, validate_gtin) are clearly different from decoding, so this tool is unambiguously distinguished.

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 provides clear context on when to use the tool (when you have an image and need to extract barcodes) and gives a specific usage hint: 'Use formats filter to restrict results.' It does not explicitly mention alternatives or when not to use it, but the distinct purpose and input/output make the usage obvious.

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