tools/list. Every tool described here is
a thin wrapper around the same service-layer functions used by the
REST API — if a call would succeed via the REST API for the
authenticated principal, it succeeds via MCP, and vice versa.
For installation see Install the MCP Server.
For error semantics see MCP Error Contract.
Conventions
- GTIN inputs accept GTIN-8, GTIN-12, GTIN-13, or GTIN-14 with or without leading zeros. Closient normalizes everything to GTIN-14 internally — the normalized form is echoed back in the response.
- Optional fields in the input schema default to
None/nulland are omitted from the resulting query when not supplied. - Errors are returned as JSON-RPC error objects with an
RFC 9457 Problem Details payload in
data. See MCP Error Contract for the code table. - Tool annotations (
readOnlyHint,idempotentHint, etc.) are documented separately in MCP Tool Annotations.
ping
Health probe. Returns the string "pong". Useful from an agent
preamble to verify the MCP connection is live before issuing real
calls.
Input: no arguments.
Output: string — always "pong".
Auth: none.
Example:
validate_gtin
Pure GTIN validation — check digit, length, format. No catalog
lookup, no auth.
Output:
Example:
resolve_gtin
Apply the GS1 Digital Link resolver-rule hierarchy
and return the destination the resolver would redirect to for a given
GTIN. Use this to learn what page (or external URL) a brand has
configured for a product without actually following the redirect.
Output:
Example:
lookup_product
Look up the structured catalog record for a GTIN. Returns
found: false (rather than an error) when the GTIN is unknown so
agents can branch on the boolean without try/except plumbing.
Output:
Example:
search_products
Natural-language search across the Closient catalog. Combines
pgvector semantic search with PostgreSQL full-text lexical search
and (optionally) PostGIS-based geographic boosting.
When both
geo_lat and geo_lng are present, results within 50 km
are boosted by proximity.
Output:
Example:
get_product_detail
Comprehensive product record — attributes, images, ingredients,
nutrition facts. Use after search_products (or whenever a GTIN is
already in hand) to fetch everything in one round-trip.
Output:
compare_products
Side-by-side comparison of 2-5 products by GTIN. Unknown GTINs
appear as found: false columns rather than raising — partial
comparisons are useful.
Output:
Example:
check_availability
Find nearby physical stores carrying a specific product. Returns
active in-store offers within radius_km, ordered by ascending
distance. When no offers exist for the product, the response is
structurally well-formed (empty locations) rather than an error
so agents can confidently say “no nearby availability” without
exception handling.
Output:
generate_qr_url
Build the canonical GS1 Digital Link
URL for a GTIN, optionally with batch/lot and serial qualifiers. The
returned URL is what should be encoded into a 2D barcode (QR or Data
Matrix). When scanned, the URL hits Closient’s resolver at
/01/{gtin14}[/10/{batch}][/21/{serial}] and returns the linkset or
redirects to the destination per the resolver rules.
Output:
Auth: OAuth 2.0 bearer token with
qr:generate scope. See
Authentication. Anonymous calls and
calls with a token that doesn’t include qr:generate return JSON-RPC
error code -32002 (forbidden).
Example:
Product write tools
Every tool in this section requires an OAuth 2.0 bearer token issued via theauthorization_code grant (an end-user token — client_credentials
tokens have no user to attribute writes to and are rejected). The caller
must additionally hold organization membership with the permission noted
per tool: CONTRIBUTE (OWNER, MANAGER, or EDITOR role) for most tools, or
OWNER/MANAGER specifically for create_product. See
Authentication for the OAuth flow and
MCP Identity Propagation for how the acting user is
threaded through to the audit trail.
Two scopes gate this family: products:write (create_product,
update_product) and dashboard:write (everything else — images,
documents, videos, nutrition, ingredients).
create_product
Create a new product and claim it for an organization — the first step of
brand-owner product entry for a GTIN not yet in Closient’s catalog.
Output: compact product summary —
{gtin, name, brand, category, description, image_url, net_content, country_of_origin}.
Auth: products:write scope; caller must be OWNER or MANAGER of the
target organization.
update_product
Update basic info, structured net content, dimensions/weight, or GPC
classification on a claimed product — all share a single field allowlist
(Product.BRAND_EDITABLE_FIELDS), so one tool covers all three.
Output: compact product summary (same shape as
create_product).
Auth: products:write scope; caller needs CONTRIBUTE permission on the
owning organization.
Example:
upload_product_image
Upload an image and attach it to a claimed product.
Output:
{id, url, title, is_primary, priority}.
Auth: dashboard:write scope; caller needs CONTRIBUTE permission.
delete_product_image
Delete an image from a claimed product. Immediate and permanent.
Output:
{deleted: true, image_id}.
upload_product_document
Upload a PDF (spec sheet, safety data sheet, certificate) and attach it to
a claimed product. Non-PDF content is rejected. Dispatches an async
metadata/thumbnail extraction task; the response reflects the upload
itself, not the enrichment (visible on a subsequent get_product_detail).
Output:
{id, url, title, description, file_size_bytes}.
update_product_document
Partially update a document’s title/description, and optionally replace
its file, on a claimed product.
Output:
{id, url, title, description, file_size_bytes}.
delete_product_document
Delete a document from a claimed product. Immediate and permanent.
Output:
{deleted: true, document_id}.
add_product_video
Attach a YouTube video link to a claimed product. YouTube only — Closient
does not host video files.
Output:
{id, youtube_url, video_id, title, description, priority}.
update_product_video
Partially update a video attached to a claimed product.
Output: same shape as
add_product_video.
delete_product_video
Delete a video from a claimed product. Immediate and permanent.
Output:
{deleted: true, video_id}.
set_product_nutrition
Create or wholesale-replace a product’s entire nutrition-facts panel —
the header plus every nutrient row — in one call. Reconciles nutrients
against what’s already stored by nutrient_type: matched rows are
updated, new types are created, and rows omitted from this call are
deleted. This is not a merge/patch operation — always pass the complete
label.
Output:
{serving_size, servings_per_container, label_format, nutrients: [{nutrient_type, amount, unit, daily_value_pct}, ...]}.
Example:
set_product_ingredients
Set a product’s ingredient statement from raw label text — Closient parses
it into structured substance mentions automatically (splitting out a “may
contain” / cross-contamination section, resolving each mention to a known
substance where possible). Wholesale-replaces any previously parsed
ingredient list for the product; there is no incremental “add one
ingredient” tool over MCP today. Mirrors the ingredients field on the
public PATCH /products/{gtin} REST endpoint.
Output:
{raw_text, ingredients: [{name, raw_text, match_type, confidence, is_sub_ingredient}, ...]}. name is null when the parser
couldn’t resolve a mention (match_type: "UNRESOLVED").
Example: