Open Footprint: convert units
ofp_convertUse this when a measurement needs converting between units (kWh to MJ, bbl to m3). Resolve unsure codes with ofp_units first.
Answers {value, unit, provenance}; keep provenance. A 422 refusal is data: error (unresolved_unit, incompatible_dimension, assumption_required, invalid_conversion_parameters) + detail; read it, do not blind-retry. Volume to energy/mass needs a declared assumption (calorificValue or density); the detail names required fields — never invent. dictionary ([name@]version) is a pin; mismatches refuse. Not CO2e.
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": {
"value": "<value>",
"fromUnit": "<fromUnit>",
"toUnit": "<toUnit>"
},
"name": "ofp_convert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | ||
| toUnit | Yes | ||
| fromUnit | Yes | ||
| assumption | No | ||
| dictionary | No |