Temperature convert
temperature-convert · version 1.0.0 · Units & sizes · free, no key needed
Convert a decimal temperature between Celsius, Fahrenheit, and Kelvin as an exact rational.
Use when you need to: temperature convert · convert temperature between C F K · celsius fahrenheit kelvin conversion.
Supported
- temperature convert
- convert temperature between C F K
- celsius fahrenheit kelvin conversion
Not supported
- Rankine
- Reaumur
- IEEE-754 floats
- weather APIs
- locale formatted temperatures
Behavior
- value is a canonical decimal string parsed as an exact rational; Number and parseFloat are not used.
- from and to are exactly C, F, or K.
- Kelvin is Celsius plus 273.15, with 273.15 equal to 5463/20.
- Fahrenheit is Celsius times 9/5 plus 32.
- Temperatures below absolute zero (K < 0) are rejected.
- The output value is the reduced canonical rational in the target unit.
Input
value(string, required): max length 32from(one of "C", "F", "K", required)to(one of "C", "F", "K", required)
Output
value(object, required)unit(one of "C", "F", "K", required)
Limits
- max digits before point: 20
- max fractional digits: 10
Example
Request input:
{
"value": "100",
"from": "C",
"to": "F"
}
Response:
{
"result": {
"value": {
"numerator": "212",
"denominator": "1"
},
"unit": "F"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "temperature-convert",
"version": "1.0.0",
"input": {
"value": "100",
"from": "C",
"to": "F"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/temperature-convert/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"value":"100","from":"C","to":"F"}'
The machine-readable contract is at /v1/tools/temperature-convert/versions/1.0.0.
CLI
node cli.mjs run temperature-convert 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Temperature compare: Compare two temperatures in C, F, or K by converting both to Kelvin rationals.
- Length convert: Convert a canonical integer length between exact SI and international customary units.
- Byte size convert: Convert a non-negative integer byte size between IEC binary units as an exact rational.
- Mass convert: Convert a canonical integer mass amount between exact nanogram-based units as a reduced rational.
- Byte size add: Add non-negative integer byte-size terms in mixed IEC units and return the exact sum in a chosen unit.
- Byte size compare: Compare two non-negative integer byte sizes by exact byte amounts.