Skip to main content
Glama

Gookit Barcode Tools

Check or add a GS1 check digit

validate_gtin
Read-onlyIdempotent

Check the check digit of a UPC-A (12 digits), EAN-13 (13) or ITF-14 (14) number, or compute it for a number given without one (set symbology). Uses the GS1 mod-10 rule, as gookit.co/barcode-generator does. It checks the arithmetic only, not whether the number is registered with GS1.

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_gtin"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesDigits. Spaces are ignored.
symbologyNoNeeded to compute a missing check digit. Without it, the code is read as complete: 12 digits UPC-A, 13 EAN-13, 14 ITF-14.

Output Schema

NameRequiredDescriptionDefault
modeYes
noteYes
inputYes
validNoOnly when mode is validated.
gtin14YesThe complete number padded to 14 digits.
completeYesThe number with the correct check digit.
next_stepNoOne line naming the Gookit product for the next step, such as printing labels. Not part of the result.
symbologyYes
check_digit_foundNo
check_digit_expectedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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 readOnly, idempotent, non-destructive and closed-world, so safety is covered. The description adds genuine substance beyond that: the mod-10 rule, the reference implementation it matches, and the explicit limitation that registration status with GS1 is not verified — preventing a false-positive interpretation of the result.

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, front-loaded with the format list and the check-vs-compute distinction, then a scope caveat. No filler and nothing buried.

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?

For a small deterministic validator with an output schema already handling return shape, the description covers formats, defaults, algorithm and scope limits. The only minor gap is not stating what a failed validation looks like versus a malformed-input error, which the output schema likely resolves.

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 the baseline is 3, but the description adds the interaction between parameters: `symbology` is only needed when the check digit must be computed, and without it the input is parsed by length. That is meaningfully more than the schema's per-field text.

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 a specific verb pair (check / compute) and the exact resources (UPC-A 12, EAN-13 13, ITF-14 14 check digits), and states the algorithm (GS1 mod-10). This is clearly distinct from the generate_* siblings, which produce codes rather than verify their arithmetic.

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 clear usage split: call it on a complete code to verify, or supply `symbology` to compute a missing check digit. It also sets a boundary ('checks the arithmetic only, not whether the number is registered with GS1'), but does not explicitly name a sibling for the generate case.

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