Skip to main content
Glama

Developer Utilities & Validators (Tanod)

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

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish read-only, idempotent, non-destructive, closed-world behavior, and the description goes well beyond that: it discloses the 422 failure modes, that failed calls are not charged, latency (~0.1 s), price (USD 0.001), and the free tier (10 calls/IP/UTC day). That is unusually complete disclosure of cost, failure, and rate-limit behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and the alternative tool, then constraints, then cost/limits, which is a sensible ordering. It is dense but nearly every clause carries decision-relevant information; the docs URL and price details are arguably extra but justified for a paid metered API.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need no explanation, and the description still covers the categories, unit naming conventions, error conditions, cost, and rate limits. Nothing an agent needs in order to call this correctly and interpret a 422 is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline would be 3, but the description adds real meaning: case sensitivity rules (kB vs kb, MB vs Mb), the ambiguity of "KB", the US vs _imp convention for gal/qt/pt/cup/fl_oz, and the reciprocal constraint on fuel economy. The one gap is that these unit lists are examples rather than a stated enumeration, but that is consistent with the open-ended string schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (convert) and resource (units of measurement) and enumerates the supported categories, so an agent knows exactly what the tool does. It also names the sibling text_numbers as the tool for spelled-out numbers, which disambiguates the one obviously adjacent case.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear routing rule ("For numbers in words use text_numbers") and defines when the tool will fail: cross-category, unknown units, ambiguous spellings, sub-absolute-zero temperatures, and zero into reciprocal fuel units. No exclusion against the sibling convert_time is stated, even though time is listed as a supported category here, which is the one ambiguity left.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.