@acjlabs/catalog-attribute-normalizer-client
v0.1.5
Published
Taxonomy-grounded catalog attribute normalizer — verified against the real Google Product Taxonomy, so it catches the plausible-but-wrong category IDs a generic LLM invents. Typed TypeScript client for the ACJ Labs MCP server; call normalize_catalog with
Maintainers
Readme
@acjlabs/catalog-attribute-normalizer-client
Taxonomy-grounded catalog attribute normalizer — verified against the real Google Product Taxonomy, so
it catches the plausible-but-wrong category IDs a generic LLM invents. Typed TypeScript client for the
ACJ Labs Catalog Attribute Normalizer MCP server — call
normalize_catalog without wiring up a full MCP client yourself.
npm install @acjlabs/catalog-attribute-normalizer-clientUsage
import { createCatalogNormalizerClient } from "@acjlabs/catalog-attribute-normalizer-client";
const client = createCatalogNormalizerClient({
baseUrl: "https://catalog-normalizer.acjlabs.com", // no trailing slash, no "/mcp"
apiKey: "your-api-key",
});
const results = await client.normalizeCatalog(
[{ title: "Men's Crew Neck Tee, Navy, Lg", description: "...", raw_attributes: { size: "Lg", color: "Navy" } }],
["google", "shopify"],
);
// results[i] is a NormalizedProduct on success, or { error, source_title } if that one product's
// classification failed — one failure never voids the rest of the batch.https://acjlabs-catalog-normalizer.acjlabs.workers.dev is an alternate base URL for the same
deployment and keeps working — if you already have it configured, nothing needs to change.
Design notes
- Only runtime dependency is
@modelcontextprotocol/sdk— installing this client doesn't pull in the server's own dependencies transitively. - Connects fresh per call. The server's MCP transport is stateless (no session state is kept between HTTP requests), so there's no session worth holding open between calls.
- Types (
NormalizedProduct,TaxonomyName, etc.) are hand-kept in sync with the server's wire schema — not imported from the server package, on purpose (see the dependency note above).
