Skip to main content
Glama

detect_barcodes

Detect and decode barcodes, QR codes, and other 1D/2D symbologies from a local image using Apple Vision offline. Returns decoded values and symbology types.

Instructions

Detect and decode barcodes or QR codes in a local image file using Apple Vision (offline, no API key needed).

USE WHEN: The user wants to read a QR code, barcode, EAN, UPC, Code128, PDF417, Aztec, DataMatrix or other 1D/2D code from a local file. DO NOT USE for: text extraction (use ocr_image), face detection (use detect_faces).

Supported symbologies: QR, EAN-8, EAN-13, UPC-E, Code39, Code93, Code128, ITF, PDF417, Aztec, DataMatrix, GS1DataBar and more.

Returns: JSON array of detected codes, each with its decoded value and symbology type.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute or relative path to the image file
Behavior4/5

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

Describes offline operation (Apple Vision, no API key) and return format (JSON array). Lacks details on error handling or empty results, but overall good.

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?

Concise, well-structured with distinct sections (description, USE WHEN, DO NOT USE, supported formats, returns). No wasted words.

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?

Covers functionality, usage, and output format. Lacks error handling or limitations, but for a simple one-param tool it is sufficiently 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?

Schema coverage is 100% with a clear parameter description. The tool description adds no further semantic details beyond what the schema provides.

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 clearly states the action (detect and decode barcodes/QR codes), the resource (local image file), and distinguishes from siblings like ocr_image and detect_faces.

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?

Provides explicit USE WHEN and DO NOT USE sections, listing specific use cases and alternatives, which helps the agent decide when to invoke this tool.

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/woladi/macos-vision-mcp'

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