Skip to main content
Glama

gtinfetch – Agentic Commerce

Fetch GTIN

fetch_gtin
Read-onlyIdempotent

What is this GTIN? Returns the signed record for a GTIN-8/12/13/14: product, brand, maker, category and pack where a source page states them, each with the pages it was read from and the date it was read; seen_in markets and banners; confidence confirmed (two or more independent domains agree) or seen (one). A GTIN with no observation answers status unknown with no fields — never a guess. Pass market (hub market code; UK accepted for GB) to tag the ask with the market: a miss is queued as a lead for that market. Can it be sold there is the hub's gate, not this door's. Extended 2026-11-13: every answer also carries answer (verified · not verified · unknown, by the published rule at https://gtinfetch.ai/rule.json), reason, facts with the variant facts (size, pack count, type), facts_compared, sources_read (each source with its last-read date), rule_version and region. Optional inputs: market (used for the recall check), believes {brand, product, size} (what you believe you are buying), receipt (true writes a signed receipt of the check in the same call at https://rco.wefetch.ai/; anyone can check it at https://rco-barcodeverified.org/verify). A barcode-only call returns everything it returned before, with the new fields beside the old.

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": {
      "gtin": "<gtin>"
    },
    "name": "fetch_gtin"
  }
}

Input Schema

NameRequiredDescriptionDefault
gtinYes8, 12, 13 or 14 digits
marketNooptional hub market code, e.g. UK, US, FR
receiptNooptional: true writes a signed receipt of this check in the same call, at https://rco.wefetch.ai/. The answer is always given; the receipt is what is paid for.
believesNooptional: what the agent believes it is buying, as the agent holds it. Checked against the record; facts_compared says what was checked and what could not be.

Output Schema

NameRequiredDescriptionDefault
as_ofNo
factsNobrand, product, maker, category and the variant facts the record holds: size, pack count, type
answerNothe firm answer, by the published rule. verified: the barcode is on record with at least one source and no conflict. not verified: the sources conflict with each other, or a recall or correction stands against the record. unknown: the barcode is not on record; it is added to the sourcing queue. On verified, go ahead; on not verified, stop and correct, or ask your principal; on unknown, treat as unchecked.
fieldsNo
gtin14Yes
reasonNoone plain sentence saying why; always present. On verified it states the number of sources that hold the barcode.
regionNowhich region answered
statusYes
receiptNopresent if a receipt was asked for: number, state (signed | pending), and where to check it
sourcesNo
signatureNo
confidenceNo
rule_versionNothe version of the published rule that produced the answer (https://gtinfetch.ai/rule.json)
sources_readNoeach source behind the record with the date it was last read
facts_comparedNowhich of the agent's stated facts were checked against the record (checked[]), and which could not be (not_checked[])

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / properties / answer / description
      Previous value: -"the firm answer, by the published rule: verified = go ahead; not verified = stop and correct, or ask your principal; unknown = treat as unchecked (the barcode is queued for sourcing)"New value: +"the firm answer, by the published rule. verified: the barcode is on record with at least one source and no conflict. not verified: the sources conflict with each other, or a recall or correction stands against the record. unknown: the barcode is not on record; it is added to the sourcing queue. On verified, go ahead; on not verified, stop and correct, or ask your principal; on unknown, treat as unchecked."
    • changedOutput schema / properties / reason / description
      Previous value: -"one plain sentence saying why; always present"New value: +"one plain sentence saying why; always present. On verified it states the number of sources that hold the barcode."
  2. Changed10 schema fields changed
    • addedInput schema / properties / believes
      Added value: +{
      +  "description": "optional: what the agent believes it is buying, as the agent holds it. Checked against the record; facts_compared says what was checked and what could not be.",
      +  "properties": {
      +    "brand": {
      +      "type": "string"
      +    },
      +    "product": {
      +      "description": "product name",
      +      "type": "string"
      +    },
      +    "size": {
      +      "description": "e.g. 400 g, 6 x 330 ml, 12 ct",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / receipt
      Added value: +{
      +  "description": "optional: true writes a signed receipt of this check in the same call, at https://rco.wefetch.ai/. The answer is always given; the receipt is what is paid for.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / answer
      Added value: +{
      +  "description": "the firm answer, by the published rule: verified = go ahead; not verified = stop and correct, or ask your principal; unknown = treat as unchecked (the barcode is queued for sourcing)",
      +  "enum": [
      +    "verified",
      +    "not verified",
      +    "unknown"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / facts
      Added value: +{
      +  "description": "brand, product, maker, category and the variant facts the record holds: size, pack count, type",
      +  "type": "object"
      +}
    • addedOutput schema / properties / facts_compared
      Added value: +{
      +  "description": "which of the agent's stated facts were checked against the record (checked[]), and which could not be (not_checked[])",
      +  "type": "object"
      +}
    • addedOutput schema / properties / reason
      Added value: +{
      +  "description": "one plain sentence saying why; always present",
      +  "type": "string"
      +}
    • addedOutput schema / properties / receipt
      Added value: +{
      +  "description": "present if a receipt was asked for: number, state (signed | pending), and where to check it",
      +  "type": "object"
      +}
    • addedOutput schema / properties / region
      Added value: +{
      +  "description": "which region answered",
      +  "type": "string"
      +}
    • addedOutput schema / properties / rule_version
      Added value: +{
      +  "description": "the version of the published rule that produced the answer (https://gtinfetch.ai/rule.json)",
      +  "type": "string"
      +}
    • addedOutput schema / properties / sources_read
      Added value: +{
      +  "description": "each source behind the record with the date it was last read",
      +  "items": {
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  3. Changed1 schema field changed
    • removedOutput schema / properties / light
      Removed value: -{
      -  "type": "object"
      -}
  4. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the annotations by explaining confidence tiering (confirmed = two or more independent domains agree, seen = one), the no-observation path (status unknown, no fields, "never a guess"), lead queuing on a miss, and the rule/versioning behind the answer. It also discloses the receipt side effect and its verification URL, which is exactly the kind of hidden consequence annotations cannot convey.

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

Conciseness3/5

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

The opening question-and-answer framing is well front-loaded, but the prose becomes a dense run-on and carries dead weight: a dated changelog line ("Extended 2026-11-13") and a legacy note that "a barcode-only call returns everything it returned before." Those sentences describe release history rather than tool behavior and should not be in a definition an agent must parse at call time.

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 complex, open-world lookup with nested inputs and an output schema, it covers the important ground: evidence provenance, confidence, unknown handling, the receipt, and the market/lead loop. Minor gaps remain around failure modes and any rate or cost limits for repeated receipt calls, and it re-explains return fields that the output schema already carries.

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%, so the baseline is 3, and the description earns an extra point by adding meaning the schema lacks: market drives a recall check and converts a miss into a market-specific lead, and believes is checked against the record with facts_compared reporting what could not be verified. It does not add format or regex detail, but the schema already covers that.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource up front ("Returns the signed record for a GTIN-8/12/13/14") and enumerates the returned fields: product, brand, maker, category, pack. No siblings exist to distinguish from, so the only deduction is that none of the disambiguation value of the phrasing is exercisable here.

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 clear operative guidance: pass market to tag the ask and queue a miss as a lead, and it explicitly bounds scope with "Can it be sold there is the hub's gate, not this door's." It stops short of naming an alternative tool for the sellability question or stating when a call is pointless, so it is a clear context rather than a full when/when-not decision rule.

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.