Skip to main content
Glama

HS Code Lookup API - Tariff, Duty Rates, Commodity Codes

hs_code_tariff_lookup
Read-onlyIdempotent

HS code lookup API, no key: product keyword to ranked HS / commodity codes, and any code to its full description chain, import duty (third-country), VAT, preferential rate for an origin country, quotas, anti-dumping and other measures for the UK tariff and the EU Common Customs Tariff. Code validation, non-declarable codes return their declarable children, bulk 50 lookups. Official HMRC data. Usable from AI agents via MCP. Free: 5 calls/day per IP. Paid: Radar API key (from €9/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.02/call via x402 at https://radarbg.com/x402/hs-code-tariff-lookup.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "q": "red wine",
      "mode": "search",
      "limit": 10,
      "market": "UK"
    },
    "name": "hs_code_tariff_lookup"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNosearch mode: product words in English, e.g. cotton t-shirt, lithium battery, roasted coffee.
codeNocode mode: HS / commodity code with 2, 4, 6, 8 or 10 digits; dots and spaces are ignored, e.g. 6109.10 or 6109100010.
modeNosearch = keyword to ranked HS/commodity codes; code = full details of one code (duty, VAT, origin rate, measures, or declarable children); validate = check that codes exist and are declarable; bulk = up to 50 queries in one call.
codesNovalidate mode: up to 100 codes.
limitNosearch mode: 1-50, default 10.
marketNoUK = UK Global Tariff (default); EU = EU Common Customs Tariff as published by the UK Trade Tariff Northern Ireland (XI) service.
originNoISO 2-letter country of origin, e.g. CN, VN, US. code mode returns the preferential rate and the duty that applies to this origin.
queriesNobulk mode: up to 50 objects, each one an input of another mode, e.g. {"mode":"code","code":"8517130000","origin":"VN"}. A failing query returns an error row; the others still answer.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior5/5

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

Annotations only declare readOnly/openWorld/idempotent; the description adds material behavior beyond them: IP-based rate limit of 5 calls/day, two auth mechanisms, official HMRC data provenance, non-declarable codes returning their declarable children, bulk limit of 50, and per-query error rows in bulk mode where other queries still succeed. These are exactly the operational facts an agent needs before calling.

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?

Content is dense and largely earnable, but it is delivered as a comma-spliced run-on that mixes capability, behavior and pricing into single clauses. The capability statement is front-loaded, yet the pricing URLs and subscription details sit inline rather than being separated, making it harder to scan than it needs to be.

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?

With 8 optional parameters and no output schema, the description does the necessary work by enumerating returned fields (description chain, duty, VAT, preferential rate, quotas, anti-dumping) and by stating data source and access tiers. Only minor gaps remain, such as the shape of the ranked search results or code-chain depth, which an agent must infer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/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 q, code, mode, codes, limit, market, origin and queries thoroughly, including mode enumeration and examples. The description restates the mode-to-parameter mapping (keyword search, code detail, code validation, bulk 50) but adds no syntax or interpretation beyond what the schema provides, so the baseline 3 applies.

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

Purpose5/5

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

The description states specific verbs and resources: product keyword to ranked HS/commodity codes, and any code to its full description chain with import duty, VAT, preferential origin rate, quotas and anti-dumping measures, scoped to UK tariff and EU CCT. An agent can tell exactly what the tool returns and how the two entry paths (keyword vs code) differ, and no sibling tool covers tariff lookup.

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?

It gives clear operating context: free tier of 5 calls/day per IP, paid access via Radar API key (X-API-Key) or x402 per call, and the two markets (UK default, EU via XI service). What's missing is explicit when-to-use/when-not-to-use routing or prerequisites for the paid paths, but for a unique capability with no sibling alternative the guidance is adequate.

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.

Resources