Convert units
convert_unitsConverts a numeric value between units in the same category, such as length, weight, or temperature, using unit names or abbreviations.
Instructions
Convert a number between units in the same category. Length: mm, cm, m, km, in, ft, yd, mi. Weight: mg, g, kg, oz, lb. Temperature: C, F, K. Names such as meter, pound, and celsius are accepted. Units from different categories cannot be converted.
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": "convert_units"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Target unit, for example mi, kg, or F. | |
| from | Yes | Source unit, for example km, lb, or C. | |
| value | Yes | Amount to convert. |