Country and HS Code Reference
trade.codesResolve a country to the UN M49 code the trade tools require, and list the HS headings this catalog maps. FREE. Call this BEFORE trade.flow, trade.partners or trade.ranking: those take a reporter code and there is no other way to discover one. Accepts ISO3, ISO2, a numeric M49 or an exact country name. Historical entities are excluded by default — twelve ISO3 codes resolve to more than one UN Comtrade entry and the expired one is never preferred, so IND gives India rather than pre-1974 India.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "trade.codes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| country | No | ISO3, ISO2, numeric M49 or exact name to resolve. Omit to list HS headings only. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| resolved | No | The matched country, when one was asked for | |
| commodities | Yes | Instrument code to HS heading |