Unit Converter
calc_unitsConvert values between length, weight, and temperature units. Supports mm, cm, m, km, in, ft, yd, mi; g, kg, oz, lb; and c, f, k.
Instructions
Convert between different units of measurement.
Supported unit types:
length: mm, cm, m, km, in, ft, yd, mi
weight: g, kg, oz, lb
temperature: c, f, k (Celsius, Fahrenheit, Kelvin)
Examples: convert_units(5, "km", "mi", "length") # 5 kilometers → 3.11 miles convert_units(150, "lb", "kg", "weight") # 150 pounds → 68.04 kilograms
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | Numeric value to convert, e.g., 100.0 | |
| to_unit | Yes | Target unit abbreviation. Valid units depend on unit_type: length (mm, cm, m, km, in, ft, yd, mi), weight (g, kg, oz, lb), temperature (c, f, k) | |
| from_unit | Yes | Source unit abbreviation. Valid units depend on unit_type: length (mm, cm, m, km, in, ft, yd, mi), weight (g, kg, oz, lb), temperature (c, f, k) | |
| unit_type | Yes | Unit category: length, weight, or temperature |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic | Yes | ||
| value | Yes | ||
| to_unit | Yes | ||
| from_unit | Yes | ||
| unit_type | Yes | ||
| difficulty | Yes | ||
| converted_value | Yes |