Skip to main content
Glama

validate.gtin

Validate product barcodes (GTIN, UPC, EAN, ISBN) with check digit verification. Returns validity, type, and canonical GTIN-14 for deduplication.

Instructions

Validate a product barcode (GTIN-8/12/13/14, UPC-A, EAN-13, ISBN-10/13) with the GS1 mod-10 / ISBN mod-11 check digit. Returns valid, type, and the canonical GTIN-14 key for product-master dedup. Deterministic — no checksum math in the LLM.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gtinYesBarcode/identifier (spaces/hyphens allowed).
Behavior4/5

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

With no annotations provided, the description fully covers behavioral traits: it declares determinism (no side effects), names the validation algorithm, and specifies the return format (valid, type, canonical GTIN-14 key). This is sufficient for a read-only validation tool.

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 sentences with no extraneous words. The first sentence covers purpose and return, the second adds determinism. Every word 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?

For a simple validation tool with one parameter and no output schema, the description covers all necessary context: input formats, validation method, output fields, and behavioral guarantee (deterministic). No gaps remain.

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 'gtin' has schema description 'Barcode/identifier (spaces/hyphens allowed).' The tool description adds valuable semantics by listing the specific barcode formats accepted, which goes beyond the basic schema description.

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 explicitly lists all supported barcode types (GTIN-8/12/13/14, UPC-A, EAN-13, ISBN-10/13) and the validation algorithm (GS1 mod-10 / ISBN mod-11). It also states the return fields (valid, type, canonical GTIN-14 key), distinguishing it clearly from sibling tools like validate.cusip or validate.iban.

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?

The description notes that the operation is deterministic and prevents checksum math in the LLM, implying use for reliable offloading. However, it does not explicitly state when to use this tool vs alternatives (e.g., other validation tools) or provide exclusion criteria.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/2s-io/sdk'

If you have feedback or need assistance with the MCP directory API, please join our Discord server