math_unit_converter
Convert numeric values between units within physical quantity categories using exact NIST conversion factors. Supports length, mass, volume, area, energy, power, pressure, temperature, and speed.
Instructions
Physical Unit Converter. Convert a numeric value between two units within a single physical-quantity category, using exact NIST SP 811 conversion factors. Supported categories are length, mass, volume, area, energy, power, pressure, temperature, and speed; the from and to units must both belong to the chosen category. Temperature is handled by formula (Celsius/Fahrenheit/Kelvin/Rankine); all other categories use a to-base multiplicative factor. Use math_running_pace_converter instead for running pace/speed splits and race-time prediction, file_file_size_calculator for digital storage units (KB/KiB/MB/MiB), and math_currency_converter for money at daily FX rates. Three operations: convert (default), listCategories (names of all categories), and listUnits (unit ids/names/symbols for one category). Runs locally on the value you provide: read-only, non-destructive, contacts no external service, deterministic, and rate-limited (60 requests/minute for anonymous callers). The convert result returns the numeric outpu
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | No | Action to run. convert requires category, fromUnit, toUnit, value. listUnits requires category. listCategories needs no other field. | convert |
| category | No | Physical-quantity category. Required for convert and listUnits. Both fromUnit and toUnit must be valid ids within this category. | |
| fromUnit | No | Source unit id within category. Required for convert. Examples: length m/cm/km/in/ft/mi; mass kg/g/lb/oz; volume L/mL/gal_us; area m2/acre/ha; energy J/kWh/BTU; power W/kW/hp_metric; pressure Pa/bar/psi; temperature K/C/F/Ra; speed m_s/km_h/mph/knot. Call listUnits to enumerate a category. | |
| toUnit | No | Target unit id within the same category. Required for convert. Same id set as fromUnit; call listUnits to enumerate valid ids for a category. | |
| value | No | Numeric quantity to convert, expressed in fromUnit. Required for convert. Accepts a JSON number or a numeric string (integer, decimal, or scientific notation); must be finite. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | No | The operation that was performed (convert, listCategories, or listUnits). | |
| data | No | Operation payload. For convert: an object with category/fromUnit/toUnit/fromValue/toValue/formattedFrom/formattedTo. For listCategories: an array of category name strings. For listUnits: an array of unit objects with id, name, symbol, and factor or formula. |