Unit Conversion
ref_unit_convertConvert a numeric value between compatible units of measure. Supports: length (mm, cm, m, km, in, ft, yd, mi), mass (mcg, mg, g, kg, oz, lb, mt = metric tonne / 1000 kg, t = US short ton / 907.18 kg), volume (ml, cl, dl, l, kl, tsp, Tbs, fl-oz, cup, pnt, qt, gal, m3), temperature (C, F, K, R — non-linear conversions handled), speed (m/s, km/h, knot, ft/s), pressure (Pa, kPa, MPa, hPa, bar, torr, psi), energy (J, kJ, Wh, kWh, MWh), power (W, mW, kW, MW, GW), frequency (Hz, kHz, MHz, GHz), digital storage (b, Kb, Mb, Gb, Tb, B, KB, MB, GB, TB), and angle (deg, rad, grad). Incompatible units (e.g., km to kg) return an error identifying the quantity mismatch.
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>",
"from": "<from>",
"to": "<to>"
},
"name": "ref_unit_convert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Target unit abbreviation (e.g., "mi", "F", "m/s", "kJ", "lb"). | |
| from | Yes | Source unit abbreviation (e.g., "km", "C", "m/h", "kWh", "kg"). | |
| value | Yes | Numeric quantity to convert. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present when the call failed. Absent on success. | |
| value | No | Input value as provided. | |
| result | No | Converted value (full precision float). | |
| measure | No | Physical quantity being measured (e.g., "length", "mass", "temperature"). | |
| to_unit | No | Target unit as recognized. | |
| from_unit | No | Source unit as recognized. | |
| result_precision | No | Human-readable rounded form of the result. |