Classify a product to HTS codes (description or invoice line)
classify_productSuggest up to 3 US HTS-10 codes for a product from a product description or an invoice line. Each candidate has: the HTS description from our own HTS data (never written by a model), a one-line reason that quotes that description, a confidence label (high, medium or low), and, when you pass origin_country, the stacked duty from the same logic as calculate_tariff (MFN + Section 301 + Section 232 + the 2026 forced-labor layer). How it works: candidates are retrieved only from our HTS data; a self-hosted model on our own server (no outside AI provider) ranks only among those candidates, and any code that is not in our data is dropped. These are SUGGESTIONS TO VERIFY, not a classification ruling: binding rulings come from US Customs and Border Protection (CBP, https://rulings.cbp.gov/), and the right line often depends on material, construction and use details a one-line description may not show. Measured on our server: about 1 to 3 minutes per call because the model runs on shared CPU hardware (set a long client timeout); if the model server is busy or unreachable the tool returns a retryable error. Free public endpoint: each call counts as 1 of your 25 daily calls. Running the npm package locally needs your own Ollama server (set TM_OLLAMA_URL).
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": {
"description": "<description>"
},
"name": "classify_product"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | Product description or invoice line, e.g. "men's 100% cotton knit t-shirt". Required. | |
| origin_country | No | Optional ISO-2 origin country (e.g. CN, VN, MX). When given, each candidate includes its stacked duty. |