Skip to main content
Glama

Look up a barcode

lookup_barcode
Read-only

Identify a product from a UPC/EAN barcode and check if the household already has it before creating a new inventory item.

Instructions

Says what product a UPC/EAN barcode is, and whether the household already has it. Use it when the person reads out or scans a barcode, before create_item; to find a thing by name use search_inventory. Looks in Ferret's own barcode book (learned from items saved on this server) first, then the online product database if it's switched on. Returns match (name, brand, model, source, photos — null when nobody knows the code) and youHave (the household's items with this code: id, name, quantity, place). When youHave isn't empty, offer adjust_stock on one of those rather than a duplicate, unless the person wants a separate item.

Input Schema

NameRequiredDescriptionDefault
barcodeYesThe digits under the barcode (UPC-A, EAN-13 or EAN-8)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.1
    • addedInput schema / properties / barcode / description
      Added value: +"The digits under the barcode (UPC-A, EAN-13 or EAN-8)"
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds real substance beyond them — the two-tier lookup order (local barcode book first, online product database only 'if it's switched on') and the null-match case when the code is unknown. It does not cover latency or failure behavior for the external lookup, which is the remaining gap given the open-world hint.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Information is front-loaded: purpose, then when-to-use, then lookup mechanics, then return shape, then follow-up behavior. Every sentence carries useful content, though the final adjust_stock sentence is dense and could be trimmed slightly without losing meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description supplies the return contract itself (match with name/brand/model/source/photos, null when unknown; youHave with id/name/quantity/place). For a single-parameter read-only tool, nothing an agent needs to call it or interpret the result is missing.

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% and the schema already explains the parameter as the digits for UPC-A/EAN-13/EAN-8, so the description's 'UPC/EAN barcode' phrasing adds little. Baseline 3 applies since the schema carries the parameter burden, including the 8-20 character constraint that the description never mentions.

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?

The opening sentence names a specific verb and resource ('Says what product a UPC/EAN barcode is') and adds the household-possession angle, which uniquely identifies this tool. It also explicitly contrasts with search_inventory ('to find a thing by name'), so an agent can separate it from siblings without reading schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

It states the triggering situation ('when the person reads out or scans a barcode'), the ordering relative to another tool ('before create_item'), and the alternative for a different intent ('to find a thing by name use search_inventory'). It even routes the follow-up decision: prefer adjust_stock over a duplicate when youHave is non-empty.

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