Skip to main content
Glama
pdf4me
by pdf4me

read_barcodes_from_image

Decode barcodes and QR codes from a local image by providing its file path. Get structured JSON output with barcode data.

Instructions

Read barcodes and QR codes from a local image using the PDF4me ReadBarcodesfromImage API. Provide the image path and optionally image type (JPG, PNG, GIF, BMP, TIFF, WEBP). (payload key isAsync). Returns structured barcode data as JSON.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesLocal path to the image file.
image_typeNoImage type passed to API payload. If omitted, inferred from extension (unknown defaults to JPG).
Behavior3/5

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

The description discloses that it uses the PDF4me API and returns structured JSON, but it does not explain implications like network usage, file size limits, or error handling. The mention of '(payload key isAsync)' is cryptic and could confuse users about synchronous behavior. With no annotations, the description only partially covers behavioral transparency.

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?

The description is mostly concise and front-loaded with a clear purpose. However, the parenthetical '(payload key isAsync)' is unclear, adds noise, and does not earn its place. Otherwise, the rest is efficient.

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?

For a simple two-parameter read tool, the description covers the essential usage (image path, optional type) and specifies the return format (JSON). Since there is no output schema, this is sufficient. It lacks details on edge cases, but the tool is low-complexity, so this is acceptable.

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 the schema already documents both parameters (file_path and image_type). The description merely repeats 'image path' and lists the same enum values, adding no new semantic detail. Therefore, a baseline score of 3 is appropriate.

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 tool reads barcodes and QR codes from a local image, using a specific verb ("Read") and resource (image). It distinguishes itself from sibling tools like 'read_barcodes' by explicitly noting 'from a local image' and requiring an image path.

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 gives clear context: use this when you have a local image path and want to extract barcodes/QR codes. It does not explicitly mention alternatives or exclusions, but the focus on 'local image' implies a distinction from other tools. No explicit when-not-to-use guidance is provided.

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/pdf4me/pdf4me-mcp'

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