Skip to main content
Glama

Validate barcode number

validate_barcode_number
Read-onlyIdempotent

Use this when the user asks whether a UPC, EAN, GTIN-8/12/13/14, SSCC, ISBN-10/13 or ISSN number is valid, what its check digit should be, or wants to convert ISBN-10 to ISBN-13, UPC-E to UPC-A, or UPC-A to EAN-13/GTIN-14. Explains the check-digit arithmetic, gives the corrected number and the GS1 prefix meaning. Does not tell who owns a number, whether it is registered with GS1, or what product it is; does not look anything up online.

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": {
      "number": "<number>"
    },
    "name": "validate_barcode_number"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNoNumber type, e.g. auto (default: detected from the length). gtin8, gtin12 (UPC-A), gtin13 (EAN-13), gtin14, sscc, upce, isbn10, isbn13, issn. Use upce or issn for 8-digit numbers that are not EAN-8.
numberYesThe number to check, e.g. 5901234123457, 036000291452, 0-306-40615-2 (ISBN-10), 0317-8471 (ISSN) or 106141412345678908 (SSCC). Spaces and hyphens are ignored. Without its check digit (e.g. 03600029145) the check digit is computed.

Output Schema

NameRequiredDescriptionDefault
kindYes
typeYes
inputYes
notesYes
validYes
barcodeYes
correctedYes
gs1_prefixYes
type_labelYes
check_givenYes
equivalentsYes
explanationYes
check_expectedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, but the description still adds real value by disclosing what the tool returns ('Explains the check-digit arithmetic, gives the corrected number and the GS1 prefix meaning') and what it deliberately will not do. It stops short of describing error behavior for malformed input, which keeps it from 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?

The trigger condition and supported formats are front-loaded in the first sentence, with scope exclusions in a compact second sentence. The first sentence is dense with format lists, but every clause carries information an agent needs.

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 a rich output schema, full parameter schema coverage, and complete annotations, the description covers everything else an agent needs: when to call it, supported symbologies, conversions offered, and what it will not answer. Nothing material is missing for 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?

With 100% schema coverage the baseline is 3, but the description adds meaning beyond the schema by naming the conversion paths (ISBN-10 to ISBN-13, UPC-E to UPC-A, UPC-A to EAN-13/GTIN-14), which explains why the type parameter and different symbologies matter. It does not directly clarify the 'auto' detection behavior for the type parameter, which the schema handles.

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 ('validate ... UPC, EAN, GTIN-8/12/13/14, SSCC, ISBN-10/13 or ISSN') and enumerates the exact tasks covered, including check-digit computation and format conversions. This clearly separates it from the sibling generate_barcode, which produces numbers rather than checking them.

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

Usage Guidelines5/5

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

It gives concrete trigger conditions ('when the user asks whether ... is valid, what its check digit should be, or wants to convert ...') and explicit exclusions ('does not tell who owns a number, whether it is registered with GS1, or what product it is; does not look anything up online'). The boundary between this tool and lookup/registry tools is unambiguous.

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