comtrade_list_codes
List valid values and upstream labels for a UN Comtrade parameter from packaged reference data, so you can choose accepted codes without an API call.
Instructions
List the values one UN Comtrade parameter takes, each with upstream's words for it.
Answered from the list packaged with this version (reference/<param>.json),
without an upstream call; meta.endpoint is the reference file or the spec the list
came from, meta.retrieved_at when the package fetched it, meta.vintage is
None. Each row holds the value under the parameter's name in snake_case
(flow_code, qty_unit_code) and upstream's words for it, under upstream's
names: text from the reference files for flowCode (tradeRegimes.json),
customsCode, motCode and mosCode; qty_abbr and qty_description for
qtyUnitCode; variable and description from ListofReferences.json for
clCode; for typeCode and freqCode text is the spec's wording ("C"
commodities, "A" annual). A value the package takes from the spec carries none:
"MIF" and "XIF" (flowCode), "BE" and "TM" (clCode), and
breakdownMode and aggregateBy, whose descriptions word no value. mosCode
lists ModeOfSupply.json's ids, not proven parameter values (data/v1/get
refused "Mode 1" and accepted "0" and "1"). At most 41 rows
(qtyUnitCode).
Args:
param: The parameter, as upstream names it: "flowCode", "customsCode",
"motCode", "clCode", "typeCode", "freqCode",
"breakdownMode", "aggregateBy", "qtyUnitCode" or "mosCode".
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": {
"param": "<param>"
},
"name": "comtrade_list_codes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| param | Yes |