Skip to main content
Glama

Look up a barcode

lookup_barcode
Read-only

Identify the product behind a UPC/EAN barcode and check if the household already has it, so you can update stock instead of creating a duplicate.

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, typicalPriceCents in priceCurrency — usually USD, not necessarily the household's — 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.

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": {
      "barcode": "<barcode>"
    },
    "name": "lookup_barcode"
  }
}

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 already declare readOnlyHint and openWorldHint, and the description adds real context beyond that: a two-tier lookup order (Ferret's own barcode book built from saved items, then the online product database if enabled) and the meaning of a null match. It stops short of stating latency, rate limits, or what happens when the online database is disabled other than that it isn't consulted.

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?

It is one dense paragraph, front-loaded with purpose and routing before the lookup mechanics and return shape. Every sentence carries information, though the return-field enumeration is lengthy and could be tightened 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's explanation of match (name, brand, model, source, photos, typicalPriceCents) and youHave (id, name, quantity, place) fills a genuine gap, including the caveat that priceCurrency is usually USD and not necessarily the household's currency. For a one-parameter read tool this leaves nothing an agent needs unexplained.

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?

With a single parameter at 100% schema description coverage, the schema already documents the barcode string and its accepted symbologies (UPC-A, EAN-13, EAN-8). The description's mention of 'the digits under the barcode' contextually reinforces scanning input but adds no format, normalization, or validation meaning beyond the schema.

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 description opens with a specific verb and resource: it says what product a UPC/EAN barcode is and whether the household already has it. It explicitly separates itself from search_inventory (name lookup) and create_item, so an agent can route correctly without opening another schema.

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 names the triggering situation (the person reads out or scans a barcode), places itself before create_item, and names search_inventory as the alternative for name-based lookup. It also gives downstream guidance: when youHave is non-empty, offer adjust_stock rather than creating a duplicate unless a separate item is wanted.

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