# Convert Fahrenheit, Celsius and Kelvin from an AI agent

You need to convert a temperature between Celsius, Fahrenheit and Kelvin and want the exact value, not a factor remembered from memory.

Use `temperature-convert@1.0.0`. It is free and needs no key or sign-up. Convert a decimal temperature between Celsius, Fahrenheit, and Kelvin as an exact rational.

## Why call a tool for this

The offset and the 9/5 factor are where hand conversions go wrong. The tool returns an exact fraction: 100 F to C gives 340/9, about 37.78, and 98.6 F gives exactly 37.

## Call it over HTTP

```sh
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"}'
```

Response:

```json
{
  "result": {
    "value": {
      "numerator": "212",
      "denominator": "1"
    },
    "unit": "F"
  }
}
```

## Call it over MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "temperature-convert",
  "version": "1.0.0",
  "input": {
    "value": "100",
    "from": "C",
    "to": "F"
  }
}
```

## Check the result

Units are C, F and K. The value is a decimal string with at most 10 digits after the point. A temperature below absolute zero is rejected as invalid_input. Divide numerator by denominator yourself and round only at the end.

Full contract, limits and unsupported cases: [Temperature convert](/tools/temperature-convert).

## Related tools

- [Length convert](/tools/length-convert)
- [Mass convert](/tools/mass-convert)
