comtrade_get_metadata
Retrieves UN Comtrade publication notes for a reporter's datasets, showing publication dates, currency, conversion factors, trade system, valuation and partner attribution per revision.
Instructions
List UN Comtrade's publication notes for a reporter's datasets, one per publication.
Upstream's getMetadata: per dataset (reporter and period), a note for its first
publication ("New Data") and one for each revision ("Revised Data"), each with its
publication_date and what the reporter's data rests on: currency, the import
and export conversion factors (Decimal), trade_system ("General" or
"Special"), the valuation ("CIF", "FOB") and partner attribution. One call.
reporter_code and period are not in upstream's spec, but upstream honours them
as the official comtradeapicall package sends them; without reporter_code the
answer holds every reporter's notes, so name one.
Args:
type_code: "C" goods or "S" services.
freq_code: "A" annual or "M" monthly.
cl_code: Classification: "HS" ("H6" is answered the same), SITC
"SS" or "S1" to "S4", "BE", "TM", for services "EB",
"EB02", "EB10".
reporter_code: Reporters, comma-separated, as list_reporters lists them:
"757" Switzerland (38 annual datasets, 1988 onwards), "842" USA,
"276" Germany, "156" China.
period: Years "2023" or months "202305", comma-separated. Omit for every
period.
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": {
"type_code": "<type_code>",
"freq_code": "<freq_code>",
"cl_code": "<cl_code>"
},
"name": "comtrade_get_metadata"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | ||
| cl_code | Yes | ||
| freq_code | Yes | ||
| type_code | Yes | ||
| reporter_code | No |