Skip to main content
Glama

Decode GS1 Barcode & Digital Link

decode_gs1

Decode a GS1 barcode element string (GS1-128, DataMatrix, FNC1 or bracketed Application Identifiers) or a GS1 Digital Link URI into fields such as GTIN, lot number, serial number, and expiration date.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesGS1 barcode element string (GS1-128, DataMatrix, FNC1 or bracketed AIs) or GS1 Digital Link URI
domainNoOptional domain used to resolve GS1 Digital Link short keys

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

No annotations exist, so the description carries full behavioral burden. It discloses the accepted encodings and the fields returned, but says nothing about error behavior on malformed element strings, whether GTIN check digits are validated, or whether parsing is deterministic/side-effect free. Useful but incomplete for a zero-annotation 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?

A single front-loaded sentence that packs the verb, supported formats, and output fields with no filler. Nothing needs trimming.

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?

With no output schema, the description helpfully names the returned fields (GTIN, lot, serial, expiration), and input formats are fully covered. It leaves error handling and check-digit validation unstated, which is a minor but real gap for a parser.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with only 2 parameters, so the schema already documents both 'data' and 'domain'. The description restates the same format list for 'data' and adds nothing about how 'domain' affects short-key resolution, so the baseline 3 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 ('Decode') paired with a precise resource and enumerates the accepted input encodings (GS1-128, DataMatrix, FNC1, bracketed AIs, Digital Link URI) plus the output fields. Closest sibling decode_udi is clearly a different standard, so the agent can distinguish this tool 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The accepted input forms imply when the tool applies, but there is no explicit when-to-use guidance, no prerequisites, and no routing hint toward decode_udi or the validate_* siblings. Usable by inference rather than by instruction.

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