Skip to main content
Glama
pdf4me
by pdf4me

add_barcode_to_pdf

Draw barcodes or QR codes on PDF pages with configurable position, size, and text display for tailored labeling.

Instructions

Draw a barcode or QR code onto PDF pages using the PDF4me addbarcode API (/api/v2/addbarcode). Requires local pdf_file_path, barcode text, barcodeType (e.g. qrCode, code128), pages spec (e.g. all, 1, 1-3, 1,3,5), alignX (Left/Center/Right), alignY (Top/Middle/Bottom), hideText. Optional: size/margins in MM or points, opacity, displayText, showOnlyInPrint, isTextAbove.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
pagesNoall
align_xNoRight
align_yNoBottom
opacityNo
hide_textNo
output_dirNo
width_in_mmNo
width_in_ptNo
barcode_typeNoqrCode
display_textNo
height_in_mmNo
height_in_ptNo
is_text_aboveNo
pdf_file_pathYes
margin_x_in_mmNo
margin_x_in_ptNo
margin_y_in_mmNo
margin_y_in_ptNo
output_file_nameNo
request_doc_nameNo
show_only_in_printNo
Behavior3/5

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

With no annotations, the description carries the transparency burden. It does disclose that a local file path is required and that it uses a remote API, but it says nothing about whether the source PDF is modified, where the output file is written, or what the API response looks like.

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 two dense sentences with no filler. The main verb and target come first, followed by required parameters and then optional parameters, making it well-structured and front-loaded.

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?

This is a high-complexity tool with 22 parameters and no annotations or output schema. The description covers input semantics and API context well, but it misses output-file behavior and alternative-tool guidance, which are important for safe and correct invocation.

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?

The schema has 0% description coverage, so the description is essential. It adds meaning by enumerating barcodeType, pages, alignX/alignY, hideText, opacity, size/margins in MM or points, displayText, showOnlyInPrint, and isTextAbove, with concrete examples. It omits output_dir, output_file_name, and request_doc_name, but the core parameter meanings are well covered.

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 opens with a specific action and resource: 'Draw a barcode or QR code onto PDF pages.' It clearly differentiates from sibling tools like create_barcode or read_barcodes by targeting an existing PDF and naming the underlying PDF4me API.

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?

It states the prerequisite ('Requires local pdf_file_path') and gives concrete allowed values for barcodeType, pages, alignX, and alignY, making the intended use case clear. It does not explicitly mention alternatives or exclusions, so it falls short of a perfect score.

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