Skip to main content
Glama

Validar EAN/UPC/GTIN

gtin-validate
Read-onlyIdempotent

Valida códigos de barras EAN-8, UPC-A, EAN-13 y GTIN-14 (dígito GS1) e identifica tipo y prefijo (p. ej. 770 = Colombia). Cuándo: hay que verificar sin conexión el formato y el dígito de control de un identificador antes de usarlo. No para: calcular el dígito de control GS1 (gtin-check-digit). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Validates GTIN-8 (EAN-8), GTIN-12 (UPC-A), GTIN-13 (EAN-13) and GTIN-14 barcodes with the GS1 mod-10 check digit and identifies the type and GS1 prefix hints (e.g. 770 = Colombia). When: an identifier's format and check digit have to be verified offline before it is used. Not for: computing the GS1 mod-10 check digit for a GTIN/EAN/UPC/SSCC body of 7-17 digits and returning the full code (gtin-check-digit). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
codeYesBarcode digits (string; required; up to 64 chars).

Output Schema

NameRequiredDescriptionDefault
typeNo
validNo
check_digitNo
gs1_prefix_hintNo
expected_check_digitNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / code / examples
      Added value: +[
      +  "7702004003508"
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Validates GTIN-8 (EAN-8), GTIN-12 (UPC-A), GTIN-13 (EAN-13) and GTIN-14 barcodes with the GS1 mod-10 check digit and identifies the type and GS1 prefix hints (e.g. 770 = Colombia). When: an identifier's format and check digit have to be verified offline before it is used. Not for: computing the GS1 mod-10 check digit for a GTIN/EAN/UPC/SSCC body of 7-17 digits and returning the full code (gtin-check-digit). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB."
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, closed-world and non-destructive, yet the description still adds genuinely new context: no network access, no stored state, deterministic output, a 64 KB input cap, a 1 s per-call budget and a 1 MB result cap. That is real rate/limit disclosure not present in the structured fields, though the safety profile itself is largely a restatement of the annotations.

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?

Ordering is strong and front-loaded: purpose, when, not-for, side effects, determinism, limits. However the full text appears twice (ES then EN) and is duplicated a third time in inputSchema.description, which inflates token cost for a one-parameter tool without adding information.

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?

An output schema exists so return values need not be explained; the description nonetheless covers exclusions, determinism, side effects and operational limits. For a single-parameter validation tool, nothing an agent needs in order to call it correctly is missing.

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% and the single code parameter is documented with maxLength 64 and an example, so the baseline is 3. The description adds no syntax guidance beyond that (e.g. whether separators or spaces are tolerated); the '770 = Colombia' detail describes output, not the input parameter.

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?

Names specific verbs and resources: validates EAN-8, UPC-A, EAN-13 and GTIN-14 including the GS1 mod-10 check digit, and returns type plus prefix hints. It explicitly separates itself from the sibling gtin-check-digit, so an agent can choose without opening either schema.

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?

Gives an explicit when-condition (verify format and check digit offline before the identifier is used) and an explicit not-for clause naming the alternative gtin-check-digit together with the case that selects it (computing the check digit for a 7-17 digit body). No inference is left to the agent.

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