Convert units
convert_unitsRead-onlyIdempotent
Convert a numeric value from one unit to another. Accepts unit names, symbols or aliases (e.g. 'km', 'miles', 'tola'). Both units must belong to the same measurement category.
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 name, symbol or alias. | |
| from | Yes | Source unit name, symbol or alias. | |
| value | Yes | The numeric value to convert. | |
| precision | No | Significant decimal digits (default 10). | |
| categoryId | No | Optional category id to disambiguate units that exist in several categories. |