Skip to main content
Glama

EAN Check barcode tools

convert_upc_e

Read-onlyIdempotent

Convert a UPC-E (6, 7 or 8 digits) to the full 12-digit UPC-A, or a UPC-A to UPC-E when one of the four GS1 zero-suppression rules fits. Checks the check digit.

Input Schema

NameRequiredDescriptionDefault
codeYesA UPC-E or a UPC-A, digits only

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, closed-world, so the safety profile is covered. The description adds genuinely new behavior beyond them: check-digit validation and the rule-bound limit on reverse conversion. It does not say whether a bad check digit raises an error, is repaired, or is returned as a flag — a notable remaining ambiguity.

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, zero filler, and the primary forward conversion is front-loaded ahead of the conditional reverse path. Length is well matched to a one-parameter tool.

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 should imply what comes back; the '12-digit UPC-A' phrasing does that for the forward direction, and it explains the failure condition for the reverse. Missing is any statement of what a failed check-digit check yields, which is the one thing an agent cannot infer.

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% and there is a single parameter, so baseline is 3. The description earns an extra point by constraining accepted UPC-E lengths to 6, 7 or 8 digits, which the schema only calls 'digits only'.

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 (convert) plus the exact resource pair (UPC-E 6/7/8 digits <-> UPC-A 12 digits) and states it checks the check digit. The format naming alone separates it from siblings like convert_isbn and repair_gtin.

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 real conditional for the reverse direction: UPC-A to UPC-E only applies when one of the four GS1 zero-suppression rules fits, so an agent knows the reverse call can legitimately fail. It does not route to siblings such as calculate_check_digits or validate_gtins for check-digit problems.

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