Compare Sourcing Countries
sourcing.compareFor one commodity and year, compare countries as a source: what the grower was paid (FAOSTAT farm gate) against what it left the country for (UN Comtrade export unit value), plus the share reaching the grower. Ranked cheapest first on a named observable field — there is NO opportunity score, because the weights would be invented. Supply freight_usd / duty_rate_pct to add a landed cost; absent costs are never defaulted, they are listed in missing. Annual data: this supports structural comparison, not an arbitrage claim. Covers the seven crops FAOSTAT prices.
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": {
"commodity": "<commodity>"
},
"name": "sourcing.compare"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | No | Four-digit year; defaults to the latest available. | |
| currency | No | Optional ISO currency for an additional converted view. | |
| incoterm | No | ||
| port_usd | No | ||
| commodity | Yes | Instrument code. Example: CC for cocoa. | |
| freight_usd | No | Caller-supplied freight per tonne. | |
| handling_usd | No | ||
| duty_rate_pct | No | Caller-supplied duty rate, percent. | |
| insurance_usd | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | Yes | ||
| notes | Yes | Read before presenting any figure from this tool. | |
| missing | No | Cost fields not supplied, hence excluded | |
| partial | No | ||
| available | Yes | False when fewer than two countries could be compared. Served free in that case. | |
| commodity | Yes | ||
| countries | Yes | Cheapest first on the ranked field | |
| ranked_by | No | The observable field the list is sorted by | |
| license_tag | No | ||
| unavailable | No | Sources that could not contribute, each with the reason | |
| sources_used | No | ||
| years_available | No |