Unit Converter
calc_unitsConvert measurements across length, weight, and temperature unit types. Enter a value, source unit, and target unit to get instant conversions like km to miles or lb to kg.
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
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_unit": "<from_unit>",
"to_unit": "<to_unit>",
"unit_type": "<unit_type>"
},
"name": "calc_units"
}
}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 |