Skip to main content
Glama

read barcode

read_barcode
Read-only

Read barcodes and QR codes from an image (URL or base64): QR, Micro QR, DataMatrix, Aztec, PDF417, MaxiCode, EAN-13/8, UPC-A/E, Code 128/39/93, Codabar, ITF and DataBar. Finds every code in the picture, even rotated, small or inverted (phone photos, receipts, labels, screenshots), and returns each one's text, format, position and meaning (URL, Wi-Fi network, vCard, e-mail, phone, location, crypto payment URI, product GTIN). No code found = not charged. Paid ($0.001, x402).

Input Schema

NameRequiredDescriptionDefault
formatsNoOnly look for these formats (default: all)
image_urlNoPublic URL of the image (PNG, JPEG, WebP, GIF, BMP, TIFF; max 8 MB). Use this or image_base64
max_resultsNoMaximum codes to return
image_base64NoThe image as base64 (or a data: URI), max 8 MB. Use this or image_url

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint/openWorldHint annotations by disclosing the pricing model ($0.001, x402 paid), the billing rule (no code found = not charged), and robustness behavior (finds every code even rotated, small or inverted). That is exactly the operational context annotations cannot convey.

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-loads the core purpose and capabilities, and nearly every clause carries information (formats, robustness, return fields, billing). It is a dense run-on paragraph, but little of it is filler, so only minor trimming is warranted.

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 enumerating the return fields (text, format, position, meaning) and the semantic decoding (URL, Wi-Fi, vCard, e-mail, phone, location, crypto URI, GTIN). Combined with input limits and billing terms, 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.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all four parameters are already documented in the schema, and the description adds no syntax or format detail beyond restating supported formats. Baseline 3 applies when the schema does the heavy lifting.

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 (read) and resource (barcodes/QR codes) plus the full set of supported symbologies, which cleanly separates it from the sibling generate_barcode. An agent can identify the decode direction and the input types without opening the schema.

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?

Gives clear usage context: image input via URL or base64, and typical scenarios (phone photos, receipts, labels, screenshots), including hard cases like rotated, small or inverted codes. It never names an alternative or states when not to use it (e.g. encoding with generate_barcode), so it stops short of a 5.

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