get_item_ports
Through which ports an item came in or went out, over a period you name (default the newest 12 months): for each port its value, its share of the item's total, the same months a year earlier and the change, the shipping weight where the source gives one, and (for the US) the value by method of transport. Optionally for one partner country; default all partners together. Ports are the source's own ports or customs offices, at the finest code the source gives ports for (see get_catalog, "ports": the US has them at HS6); a code above or below that level, or a reporter without port detail, gets the error port_unavailable. A port whose value the source hides is null with a reason, never 0. The ports are the entry or exit point of the goods, not their origin or destination. Use this tool when asked through which port, customs office or entry point an item came in or went out.
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": {
"reporter": "<reporter>",
"flow": "<flow>",
"code": "<code>"
},
"name": "get_item_ports"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Optional last month, YYYY-MM. Default: the latest published month. | |
| code | Yes | Required. The code at the level the reporter has port detail for (US: HS6, 6 digits); dots are ignored. | |
| flow | Yes | Required. "import" (goods entering the reporting country) or "export" (goods leaving it); there is no combined view: "both" does not exist. For a comparison across countries use compare_countries, for exports minus imports use get_balance. | |
| from | No | Optional first month, YYYY-MM. Default: 11 months before the last. | |
| limit | No | Optional. Ports shown, the largest first (default 20). | |
| country | No | Optional partner country (ISO alpha-2 code or name); omit for all partners together. | |
| reporter | Yes | Required. The reporting country whose customs statistics are read: "JP" (Japan), "US" (United States), "GB" (United Kingdom) or "EU" (European Union (27 member states)). Partners are the other countries. |