Skip to main content
Glama
htsapi.dev MCP server

htsapi.dev MCP server

classify_product

Classifies a product to a US HTS code from its description, material and origin, returning the code or the deciding question with candidate options, reasoning and CBP rulings.

Instructions

Classify a product to a US HTS code. COSTS 1 CREDIT (refunded if it fails). Takes 10-60 s.

Read `answer` first. `answer.code` is as deep as the facts given decide (10 digits when they
do). When they do not, `answer.options` are the codes it could be, each with its `condition`,
base rate and `importers_paid`, and `answer.question` is the fact that decides: ask the user,
then call again with the answer added to the description (a new call, 1 credit).
`candidates` carry the reasoning and the CBP rulings behind each code.

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

NameRequiredDescriptionDefault
materialNoMain material, if not already in the description.
descriptionYesWhat the product is, what it is made of and what it is for, in plain words (3-2000 characters). Several listings of the same product may be pasted together.
country_of_originNoCountry of origin: name, ISO code or common alias (China, CN, PRC, Viet Nam). Adds what importers from there paid on the code (Census, the latest 3 published months).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations, the description discloses substantial behavior: the operation costs 1 credit (refunded if it fails), takes 10-60 seconds, produces `answer.code` at variable depth, exposes `answer.options` with conditions and importer data, and includes `candidates` with reasoning and CBP rulings. This is rich operational and output context that an agent cannot infer from the annotations alone.

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

Conciseness5/5

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

The description is front-loaded with purpose, cost, and latency, then moves into the output-reading workflow. Every sentence carries useful operational meaning, including cost per retry, and there is no redundant filler.

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?

For a multi-step classification tool with a rich output schema, the description covers the essential gaps: cost, latency, how to interpret partial answers, how to continue with user input, and what supporting data is available. It is complete enough for an agent to invoke and iterate correctly.

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 schema already documents the three parameters. The description still adds a meaningful non-obvious instruction for the `description` parameter: on a follow-up call, add the decider fact to the description, which clarifies how to use that parameter across the iterative classification workflow.

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?

The description states a specific verb and resource: 'Classify a product to a US HTS code.' It is immediately clear what the tool produces, though it does not explicitly distinguish itself from sibling tools such as lookup_hts_code or rulings_under_code.

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?

The description gives a clear usage workflow: read `answer` first, inspect `answer.options` when the code is not fully determined, ask the user the question in `answer.question`, then call again with the answer added to the description. It does not name when to use this tool versus alternative sibling tools, so it falls short of explicit alternative routing.

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