Skip to main content
Glama

validate_gtin

Read-onlyIdempotent

Validate a UPC, EAN, GTIN or ISBN-13. Checks the GS1 check digit and names the format (UPC-A, EAN-13, EAN-8, GTIN-14). When the digit is wrong it returns the digit it should be. Notes ISBN and ISSN prefixes. It does not look the product up. Nothing is stored.

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
codeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is covered. The description adds genuine behavior beyond that: it returns the corrected check digit on failure and names the detected symbology, and clarifies no product lookup occurs. It doesn't spell out edge cases (non-numeric input, wrong length), which keeps it below 5.

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?

Five short sentences, front-loaded with the verb and accepted formats, then output behavior, then exclusions. Every sentence adds information; 'Nothing is stored' is the closest to redundant with readOnlyHint but still reinforces side-effect absence in plain language.

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 one-parameter, no-output-schema validation tool this covers what to pass, what is checked, what comes back (format name, corrected digit), and what is out of scope. Missing only input-format tolerance and failure-threshold behavior, which are minor for this complexity.

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 has 0% schema coverage, so the description must carry the meaning: it does, by enumerating accepted standards (UPC, EAN, GTIN, ISBN-13) and implying the value is a numeric product code. It does not address tolerated formatting such as dashes or spaces, or the schema's 32-character cap, leaving a small gap.

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?

Specific verb plus specific resource: 'Validate a UPC, EAN, GTIN or ISBN-13' and 'Checks the GS1 check digit'. It also states the exact output shape (format name), so an agent can distinguish it from neighboring tools like publishing_isbn or security_barcode_code128 without opening the 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?

Usage context is clear from 'Validate a UPC, EAN, GTIN or ISBN-13', and the exclusion 'It does not look the product up' rules out a plausible wrong expectation. It stops short of naming an alternative for the lookup case or for barcode generation, so it is clear but not fully routing.

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