GnistAI GnistAI
Log in

Unit Conversion

Convert between units across 10 categories — length, mass, volume, area, speed, time, temperature, digital storage, energy, and pressure.

Overview   |   MCP Docs   |   API Docs   |   OpenAPI   |   Playground   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 4 tools tools 4 4 Utilities

Data source: Built-in conversion factors

MCP MCP Protocol

Endpoint https://context.gnist.ai/mcp/unit-conversion/
claude_desktop_config.json
{
  "mcpServers": {
    "gnist-unit-conversion": {
      "url": "https://context.gnist.ai/mcp/unit-conversion/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}
Shell
curl -X POST "https://context.gnist.ai/mcp/unit-conversion/" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "convert_units", "arguments": {"value": 1.0, "from_unit": "example", "to_unit": "example"}}}'

API REST API

API Root https://context.gnist.ai/rest/unit-conversion/

4 endpoints available:

Shell
curl "https://context.gnist.ai/rest/unit-conversion/convert_units?value=1.0&from_unit=example&to_unit=example" \
  -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx

resp = httpx.get(
    "https://context.gnist.ai/rest/unit-conversion/convert_units",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    params={
        "value": 1.0,
        "from_unit": "example",
        "to_unit": "example"
},
)
print(resp.json())

OpenAPI Spec  ·  Full API Docs

CLI Command Line

Command gc unit-conversion

CLI documentation will be available when the GnistAI SDK is published.

Install
pip install gnistai

Available Tools (4)

convert_units
Convert a value from one unit to another.
ParameterTypeRequiredDescription
valuenumberrequiredThe numeric value to convert.
from_unitstringrequiredSource unit (e.g. 'kilometer', 'pound', 'fahrenheit').
to_unitstringrequiredTarget unit (e.g. 'mile', 'kilogram', 'celsius').
list_unit_categories
List all supported unit categories and their units.
list_units_in_category
List all available units in a specific category.
ParameterTypeRequiredDescription
categorystringrequiredCategory name (e.g. 'length', 'mass', 'temperature').
report_feedback
Report a bug, feature request, or general feedback for this data source.
ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")

Related