Skip to main content
Glama

Decode barcode from image

decode_barcode

Decode 1D and 2D barcodes from image files or base64 strings. Supports QR, Code 128, EAN, UPC, DataMatrix, and more, returning decoded values and formats.

Instructions

Decode 1D and 2D barcodes (QR, Code 128, EAN, UPC, Code 39, DataMatrix, etc.) from an image supplied as a base64 string or a local file path. Returns the decoded value(s) and format(s).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoLocal image file path (png/jpg/etc.)
base64NoImage as base64 (data URI prefix allowed)
formatsNoOptional list of zxing formats to restrict to (e.g. ["QR_CODE","CODE_128"])
Behavior4/5

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

With no annotations provided, the description does the job of disclosing core behavior: it takes an image (base64 or path) and returns decoded values and formats. It doesn't mention potential limitations or edge-case behavior, but for a read-only decode operation, it provides adequate transparency.

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 sentences, front-loaded with purpose and formats. Every sentence is informative with no filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description explains the return value and input options, but the schema allows zero required parameters, and the description doesn't explicitly state that at least one of path/base64 must be provided. This ambiguity could lead an agent to call with no input, so it isn't fully complete.

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?

The schema already covers all three parameters with descriptions (100% coverage). The description adds no extra meaning beyond stating the input can be base64 or file path, which is already in the schema. It doesn't clarify the mutual exclusivity of path/base64 or that none are formally required.

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 uses the specific verb 'Decode' and clearly identifies the resource as barcodes from an image, listing many format examples. It is distinct from the sibling tools which are generation/encoding tools.

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 tool's purpose as a decoder is clear and contrasts with siblings that generate/encode barcodes. However, it doesn't explicitly state when to choose this over alternatives or mention any exclusions, but the context is sufficient for most use cases.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Convalexa-Solutions-LLP/barcode-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server