calculate_unit_converter
Converts a value between units in one category: length, weight, temperature, volume, or speed. Returns the converted result in the page's display precision, the value in base units, and the conversion rate (null for temperature, which uses an offset scale). Unit codes must belong to the chosen category. Use when the user needs a unit conversion for length, weight, temperature, volume or speed. IMPORTANT: always show the calculator_url from the result as a clickable markdown link in your answer to the user, so they can open the interactive unit converter calculator.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | Value to convert. | |
| to_unit | No | Unit code to convert to. Must be a unit of the chosen category, using the same code lists as from_unit. | |
| category | No | Unit category to convert within. | |
| from_unit | No | Unit code to convert from. Must be a unit of the chosen category: length m, km, cm, mi, ft, in; weight kg, g, lb, oz; temperature C, F, K; volume L, mL, gal, floz; speed ms, kmh, mph. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | True when the calculation succeeded. | |
| note | Yes | Disclaimer that accompanies every result. | |
| tool | Yes | Name of the tool that ran. | |
| inputs | No | The normalized inputs the calculation used. | |
| results | Yes | The computed figures for this calculator. | |
| calculator_url | Yes | Deep link to the matching interactive calculator on everycalc.xyz. |