unit_convert
Convert numeric values between length, mass, and temperature units, including km to miles, pounds to kilograms, and Celsius to Fahrenheit. Handles exact factor-based conversions only.
Instructions
Convert a value between units of length (mm, cm, m, km, inch, foot, yard, mile), mass (mg, g, kg, tonne, ounce, pound) or temperature (celsius, fahrenheit, kelvin) and return the converted number. Pure and stateless, no side effects, no auth beyond the group's key. Units are matched case-insensitively by the names listed; an unknown unit or a conversion across families (length to mass) returns a tool error (isError) naming the accepted units. Use it for exact factor-based conversions; it does not handle currencies, dates or compound units such as km/h.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | the quantity to convert, in from_unit | |
| to_unit | Yes | unit of the result, same family as from_unit | |
| from_unit | Yes | unit of value, e.g. km, pound, celsius |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | value expressed in to_unit |