Convert units
convert_unitsConvert a numeric value between units in the same category, such as length, weight, temperature, volume, speed, area, data, or time, by specifying the value, category, source unit, and target unit.
Instructions
Convert a value between units of the same category. Units (symbol or name): length: m, km, mi, ft, in, cm, mm, yd, nmi; weight: kg, g, lb, oz, t, mg, st; temperature: °C, °F, K; volume: L, mL, gal, fl oz, cup, tbsp, m³; speed: km/h, mph, m/s, kn, ft/s; area: m², km², mi², ft², ac, ha; data: B, KB, MB, GB, TB, bit, KiB, MiB, GiB, TiB; time: s, min, h, d, wk, mo, yr, ms.
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>",
"category": "<category>",
"from": "<from>",
"to": "<to>"
},
"name": "convert_units"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Unit symbol or name, e.g. mi or mile | |
| from | Yes | Unit symbol or name, e.g. km or kilometer | |
| value | Yes | A plain number, e.g. 12.5 | |
| category | Yes |