Skip to main content
Glama
pdf4me
by pdf4me

read_barcodes

Read barcodes and QR codes from PDF files, returning structured JSON data. Specify barcode types and page ranges for precise extraction.

Instructions

Read barcodes and QR codes from a local PDF using the PDF4me ReadBarcodes API. Provide the file path, barcode types (e.g. all, qrCode, dataMatrix, code128), and pages. Always requests async processing (isAsync true); on HTTP 202 the tool polls the Location URL. Returns structured barcode data as JSON.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pagesNoPages expression like "all", "1", "1,3,5", "2-5", "1,3,7-10", "2-".all
file_pathYesLocal path to the PDF file.
barcode_typeNoBarcode type filters sent to the API (defaults to ["all"]).
Behavior4/5

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

With no annotations, the description carries the burden and does well by disclosing the async processing behavior (isAsync true, polling on HTTP 202) and the JSON return format. It does not cover errors or permissions, but the key behavioral traits are transparent.

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 concise and front-loaded: three sentences cover purpose, inputs, and behavior without fluff. Every sentence adds meaningful information.

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?

The tool is relatively simple with only 3 parameters and no output schema. The description covers the async workflow, return format, and inputs, making it sufficient for most use cases. Missing detail on error handling is a minor gap, but the description is complete enough for an agent to invoke it correctly.

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 coverage is 100%, so the baseline is 3. The description adds value with example barcode types (all, qrCode, dataMatrix, code128) and reiterates the required inputs, which helps the agent construct valid calls beyond the bare schema.

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 PDF, which is a specific verb+resource combination. It also distinguishes itself from the sibling tool read_barcodes_from_image by explicitly noting the PDF input source.

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 makes it clear this tool is for PDF barcode reading, which gives strong context. However, it does not explicitly mention when not to use it or point to alternatives like read_barcodes_from_image for image inputs, so it falls short of full usage guidance.

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