Skip to main content
Glama

validate_gtin

Verify a product barcode check digit and identify its type and country of origin. Handles EAN-8, UPC-A, EAN-13, and GTIN-14.

Instructions

USE THIS to verify a product barcode — GTIN/EAN/UPC — before trusting it, instead of guessing the check digit. Handles EAN-8, UPC-A (12), EAN-13 and GTIN-14, verifies the GS1 mod-10 check digit, and returns the barcode type plus the GS1 prefix's issuing country (e.g. 50 = UK, 690-699 = China, 978 = Bookland/ISBN). Validates structure only — it does NOT confirm the barcode maps to a real, registered product.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gtinYesThe barcode digits (EAN-8/UPC-A/EAN-13/GTIN-14); spaces and hyphens are ignored.
Behavior4/5

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

With no annotations provided, the description carries full burden. It discloses that validation is structural only, not a real-product check, and mentions the output includes barcode type and country. It does not directly state that the operation is read-only or side-effect-free, but that is implied. Good transparency overall.

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?

The description is concise, with three sentences each serving a purpose: imperative instruction, technical details, and a limitation. No unnecessary words, and front-loaded with the key directive.

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?

Given the simplicity (one param, no output schema), the description is quite complete. It covers purpose, supported formats, validation logic, output elements, and a limitation. It could mention the exact return type, but the description is sufficient for an agent to invoke correctly.

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' is fully described in the schema. The description adds value by noting that spaces and hyphens are ignored, which is not in the schema. This enhances usability.

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 clearly specifies the verb 'verify' and the resource 'product barcode — GTIN/EAN/UPC', and lists the specific formats handled (EAN-8, UPC-A, EAN-13, GTIN-14). It distinguishes itself from sibling validation tools by focusing on barcodes, not other identifiers.

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 description explicitly says 'USE THIS to verify a product barcode... instead of guessing the check digit', providing a clear when-to-use. It also warns that it validates structure only, not real product registration. However, it does not explicitly compare to or exclude sibling tools like validate_isbn, though the name and context are sufficient.

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/qinisolabs/qiniso'

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