Skip to main content
Glama

add_barcode

Attach a GTIN/EAN barcode to a product. Scanning that code then identifies the product for stock actions, removing the need to type a name.

Instructions

Attach a GTIN/EAN barcode to a product.

Once attached, that code resolves to this product everywhere a tool takes a product argument, so a scanned package can be consumed or restocked without typing a name.

Args: product: Product name or description fragment. barcode: The full GTIN/EAN as printed under the bars.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
barcodeYes
productYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral burden. It usefully discloses that the code becomes a global resolution alias after attachment, but it does not address what happens if the barcode is already assigned, whether it replaces an existing binding, or any error/authorization behavior.

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?

The description is compact, front-loads the core action, and uses a short argument list. Every sentence contributes either semantics, usage context, or parameter meaning with no filler.

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 simple two-argument mutation, the description covers what the tool does, why it matters, and how to fill both parameters. It lacks only edge-case behavior such as duplicate barcode handling, but it is still enough for an agent to select and invoke it correctly.

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 0%, so the description must define the parameters, and it does: product is 'a name or description fragment' and barcode is 'the full GTIN/EAN as printed under the bars.' These meanings go well beyond the bare string type in the schema, though they stop short of specifying format constraints.

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?

Opens with 'Attach a GTIN/EAN barcode to a product,' a specific verb plus resource, and the follow-up sentence explains the effect of the binding. This clearly distinguishes it from the sibling remove_barcode and from product creation tools.

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?

The description gives clear context: the barcode resolves to the product everywhere a product argument is accepted, enabling scan-based consumption or restocking. It does not explicitly list exclusions or name alternative tools, but the intended use case is evident.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.