Skip to main content
Glama

Read a QR code or barcode

read_barcode
Read-onlyIdempotent

Read QR codes and barcodes from an image. Send base64 or a public URL. Private addresses are refused and the decoded file is capped at 10 MB. Returns each code's text and format. An image with no code returns an empty list.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file": "<file>"
    },
    "name": "read_barcode"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesThe image. Provide url or data.

Output Schema

NameRequiredDescriptionDefault
codesYes
countYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and openWorld, but the description adds genuinely new behavioral facts: private and local addresses are refused, the decoded payload is capped at 10 MB, and the result carries each code's text and format. The empty-list-on-no-code statement is redundant with the output schema, keeping this below a 5.

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?

Four short sentences with no filler, and the core action plus input options are front-loaded ahead of the limits and return notes. The final sentence about an empty list is the one item that arguably does not earn its place given an output schema exists.

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 single-parameter read tool with an output schema and full annotation coverage, the description supplies the constraints an agent actually needs — accepted input forms, size cap, and address restrictions. Only the missing sibling routing keeps it from being 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?

Schema description coverage is 100%, so the nested file object's url/data/filename/mimeType fields are already fully documented, establishing a baseline of 3. The description only restates the url-or-data choice and the 10 MB cap that the schema already carries, adding no new syntax or format meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence states a specific verb and resource — 'Read QR codes and barcodes from an image' — which is clearly the inverse of the sibling generate_qr_code. It is precise about the operation, but never explicitly names or routes against a sibling tool, so it stops short of full differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Send base64 or a public URL' implies the input situations where this tool applies, but there is no explicit when-to-use framing, no exclusions, and no guidance about choosing this over read_image_text or other image-reading siblings. Usage is inferable rather than stated.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.