Skip to main content
Glama

gtin_validate

Validate and normalize GTIN, EAN, and UPC codes using GS1 check digits, returning corrected codes, GTIN-14/EAN-13 forms, and region data for up to 100 codes per call.

Instructions

GTIN / EAN-8 / EAN-13 / UPC-A / UPC-E / GTIN-14 validation and normalisation (GS1 check digit): type, expected check digit, corrected code, GTIN-14 and EAN-13 forms, GS1 prefix region, book/coupon flags. Up to 100 codes per call. Costs 0.001 USDC on Base per successful call (x402). Without a payment key this tool returns the 402 challenge.

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": {
      "gtin": "<gtin>"
    },
    "name": "gtin_validate"
  }
}

Input Schema

NameRequiredDescriptionDefault
gtinYesCode(s), comma-separated

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden and does well: it discloses pricing model, payment prerequisite, the failure mode (402 challenge without a key), a batch ceiling, and the exact fields returned. It stops short of explaining what happens to individual invalid codes in a batch or whether partial failures are still billed.

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?

One dense paragraph, front-loaded with the capability, then the return fields, then limits and pricing. Every clause carries information, though the return-field enumeration is compact enough to verge on a data dump.

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?

With no output schema and no annotations, the description compensates by naming the returned fields, the cost, and the auth failure mode. The only meaningful gap is the handling of invalid inputs within a multi-code batch.

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?

The single parameter's schema already states 'Code(s), comma-separated' at 100% coverage, and the description adds the non-obvious 100-code ceiling that the schema omits. It adds real constraint value beyond the schema, though it does not discuss delimiter handling or whitespace tolerance.

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 pair (validation and normalisation) plus the exact resource family it handles (GTIN, EAN-8/13, UPC-A/E, GTIN-14) and the standard applied (GS1 check digit). This immediately distinguishes it from code-validation siblings such as isbn_validate and eori_validate without needing to open any 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?

Gives concrete operating context: up to 100 codes per call, 0.001 USDC on Base per successful call, and the 402 challenge returned without a payment key. It does not explicitly name alternatives or say when not to use it, but the enumerated symbologies implicitly scope out ISBN/EORI-style validators.

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