Skip to main content
Glama

Alomo: Lookups

Validate a barcode number (GTIN, EAN, UPC) or compute its check digit

validate_barcode
Read-onlyIdempotent

Checks the GS1 check digit of a GTIN-8 (EAN-8), GTIN-12 (UPC-A), GTIN-13 (EAN-13) or GTIN-14, returns the 14-digit form, and flags special prefix ranges (in-store codes, ISBN/ISSN, coupons). Set compute_check_digit to get the missing last digit for a number without one. Doesn't identify the product or company: GS1's registry isn't open.

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": {
      "code": "<code>"
    },
    "name": "validate_barcode"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesBarcode digits, e.g. '4006381333931'.
compute_check_digitNoTreat the input as missing its check digit and compute it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered. The description adds real value beyond that by describing the return shape (14-digit normalized form plus special prefix flags like in-store codes, ISBN/ISSN, coupons) and the limitation that GS1's registry is not open. It stops short of noting any caveats such as how invalid or non-numeric input is reported, keeping it at adequate rather than rich.

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?

Three tight sentences: capability and accepted formats first, then the optional compute mode, then the scope limit. No filler and 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 no output schema, the description correctly supplies the return semantics (14-digit form, prefix-range flags). Combined with the documented limit on product identification, an agent has everything needed to call this correctly and interpret results.

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?

Schema coverage is 100%, so baseline is 3. The description goes past the schema by binding the accepted GTIN formats to the `code` parameter and clarifying that compute_check_digit is for inputs that lack a trailing digit, which sharpens when each format path applies.

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 and resource ("Checks the GS1 check digit") and enumerates the exact identifier families handled (GTIN-8/EAN-8, GTIN-12/UPC-A, GTIN-13/EAN-13, GTIN-14). It also explicitly carves out what it does not do (identify product or company), which separates it from sibling lookups like isbn_lookup.

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 a concrete conditional for the alternative mode: "Set compute_check_digit to get the missing last digit for a number without one." It also states a clear exclusion (no product/company identification), though it does not name a sibling tool to use instead for that need.

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