Skip to main content
Glama

Check a barcode number

check_barcode
Read-onlyIdempotent

Say what a barcode number is without looking up the product: its type (UPC-A, UPC-E, EAN-13, EAN-8, GTIN-14, ISBN), whether the check digit is right and what it should be, the same number in every other form, where its prefix was issued, and whether it is an in-store or coupon number. Also reads GS1 Digital Link web addresses and GS1 element strings from 2D codes (batch, serial, expiry date). Free: uses no lookups and needs no key.

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": {
      "barcode": "<barcode>"
    },
    "name": "check_barcode"
  }
}

Input Schema

NameRequiredDescriptionDefault
barcodeYesThe number or scanned text, for example 049000050103 or https://id.gs1.org/01/09506000134352.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds genuinely non-redundant behavior: it performs no external lookups, requires no API key, and accepts GS1 Digital Link URLs and GS1 element strings from 2D codes (batch, serial, expiry) — the latter is a capability not visible in the annotations. It stops short of describing the response shape, which matters somewhat since there is no 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with the core purpose and the negative constraint ('without looking up the product') before the enumeration of outputs, so an agent gets the essential distinction in the first clause. The long mid-sentence list of return values is dense but each item carries information; the closing sentence on cost/key is short and earns its place.

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 one required parameter, no output schema, and a rich annotation set, the description carries the remaining burden and does so: it covers what inputs are accepted, what the tool computes, and that it is offline and key-free. Nothing an agent needs in order to decide to call this tool or to construct the input appears to be missing.

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% for the single required 'barcode' parameter, so the baseline is 3. The description still adds meaning beyond the schema by stating that the accepted input includes GS1 Digital Link web addresses and GS1 element strings from 2D codes, which broadens the understood input domain beyond the numeric example in 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?

The description opens with a specific verb+resource ('Say what a barcode number is') and immediately draws the boundary against the sibling lookup tools: 'without looking up the product'. It then enumerates exactly what the tool reports (type, check digit validity, alternate forms, prefix issuer, in-store/coupon status), so an agent can distinguish it from lookup_barcode without opening the schema.

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 phrase 'without looking up the product' clearly signals the condition that selects this tool (offline validation) versus a product lookup, and 'Free: uses no lookups and needs no key' reinforces when it is appropriate. It never names lookup_barcode or search_products explicitly, so the routing guidance is strong but implicit rather than an explicit when/when-not statement.

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