Skip to main content
Glama

Barcode scanner

read_barcode
Read-onlyIdempotent

Read every barcode in a PNG, JPEG or WebP image, given as base64 (or a data URL), a public https URL, or an attached file. At most 2 MB and 4000 by 4000 pixels. Returns text, format, corner positions and GS1 product number, expiry and lot when present.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoPublic https URL of a PNG, JPEG or WebP image; 2 MB maximum.
fileNoAn image file the user attached (OpenAI Apps SDK file parameter).
imageNoBase64 PNG/JPEG/WebP or image data URL; 2 MB decoded maximum. Give one of image, url or file.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "url": "https://apitoolcalls.com/barcode-scanner/samples/ean13.png"
      +  }
      +]
    • addedInput schema / properties / file
      Added value: +{
      +  "description": "An image file the user attached (OpenAI Apps SDK file parameter).",
      +  "properties": {
      +    "download_url": {
      +      "type": "string"
      +    },
      +    "file_id": {
      +      "type": "string"
      +    },
      +    "file_name": {
      +      "type": "string"
      +    },
      +    "mime_type": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "download_url",
      +    "file_id"
      +  ],
      +  "type": "object"
      +}
    • changedInput schema / properties / image / description
      Previous value: -"Base64 PNG/JPEG/WebP or image data URL; 2 MB decoded maximum."New value: +"Base64 PNG/JPEG/WebP or image data URL; 2 MB decoded maximum. Give one of image, url or file."
    • addedInput schema / properties / url
      Added value: +{
      +  "description": "Public https URL of a PNG, JPEG or WebP image; 2 MB maximum.",
      +  "maxLength": 8192,
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "image"
      -]
  2. Added
  3. Removed
  4. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, openWorld, non-destructive), so the bar is lower. The description still adds real substance: hard limits of 2 MB and 4000x4000 pixels, and an enumeration of what comes back (text, format, corner positions, GS1 product number, expiry, lot) in the absence of an output schema.

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?

Two dense sentences: accepted inputs and limits first, returned fields second. No filler, no restatement of the title, every clause carries information an agent needs before calling.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description takes responsibility for describing return values and it does so concretely. Combined with the input limits and the three mutually exclusive input paths, an agent has everything needed to make a correct call.

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, but the description adds the 4000x4000 pixel cap that appears nowhere in the schema (the schema only repeats the 2 MB limit per parameter). It also clarifies that exactly one of image/url/file should be supplied, reinforcing rather than merely echoing the 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?

States a specific verb and resource ('Read every barcode in a ... image') plus the accepted input forms and payload size limits. The read-side verb cleanly separates it from the generate-side siblings make_barcode and make_qr without needing to name them.

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?

Usage is implied: it accepts an image one of three ways, and the schema note says 'Give one of image, url or file.' There is no explicit when-to-use or when-not guidance (e.g. no statement about preferring the attached-file path over base64, or any input that this tool will reject as out of scope).

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.

Resources