Skip to main content
Glama

convert_units

Read-onlyIdempotent

utilpeek: Convert units of measurement: length, weight, temperature, volume, pressure, energy, data size. For numbers in words use text_numbers. Returns a value converted between two units of one category, with the exact factor: length, mass, temperature (with offsets), volume (US and imperial), area, speed, pressure, energy, power, data size (kB = 1000 bytes, KiB = 1024), time and fuel economy (reciprocal). Cross-category or unknown units, ambiguous spellings (KB), temperatures below absolute zero and 0 into a reciprocal fuel unit are a 422 before any payment (not charged). gal, qt, pt, cup and fl_oz are US; the imperial ones end in _imp. Typically under 0.1 s. Price: USD 0.001. Free: 10 utilpeek calls per IP per UTC day. Docs: https://tanod.dev/learn/unit-conversion-api.html

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "value": "<value>",
      "from": "<from>",
      "to": "<to>"
    },
    "name": "convert_units"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesUnit to convert to, of the same category as `from`.
fromYesUnit to convert from: a symbol or name such as in, ft, mi, kg, lb, C, F, K, L, gal, gal_imp, m2, acre, km/h, mph, kn, psi, inHg, atm, kWh, BTU, eV, hp, kB, KiB, Mbit, h, L/100km, mpg, mpg_imp. Case matters only where it must (kB vs kb, MB vs Mb).
valueYesThe number to convert (at most 1e300 in magnitude).

Output Schema

NameRequiredDescriptionDefault
toNo
fromNo
kindNo
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
valueNo
factorNo
offsetNo
resultNo
formulaNo
to_nameNo
categoryNo
from_nameNo
factor_exactNo
offset_exactNo
factor_decimalNo
offset_decimalNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedInput schema / properties / from / title
      Removed value: -"From"
    • removedInput schema / properties / to / title
      Removed value: -"To"
    • removedInput schema / properties / value / title
      Removed value: -"Value"
    • removedInput schema / title
      Removed value: -"convert_unitsArguments"
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "category": {
      +      "enum": [
      +        "length",
      +        "mass",
      +        "temperature",
      +        "volume",
      +        "area",
      +        "speed",
      +        "pressure",
      +        "energy",
      +        "power",
      +        "data",
      +        "time",
      +        "fuel_economy",
      +        null
      +      ],
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "error": {
      +      "description": "Only on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object."
      +    },
      +    "factor": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "factor_decimal": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "factor_exact": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "formula": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "from": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "from_name": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "kind": {
      +      "enum": [
      +        "multiply",
      +        "affine",
      +        "reciprocal",
      +        null
      +      ],
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "offset": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "offset_decimal": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "offset_exact": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "result": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "to": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "to_name": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "value": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  3. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources