Skip to main content
Glama

Lordevo Shop (x402 website checks)

Unit converter with exact factors (NIST SP 811) ($0.002/call)

unit_convert
Read-onlyIdempotent

$0.002 per call (x402, USDC on Base; free trial: add "trial": true or use try_free). [Data utilities] Converts a value between units exactly, with rational factors from NIST SP 811 and HB 44 (inch = 0.0254 m, pound = 0.45359237 kg, US gallon = 231 in3): length, area, volume (US and imperial), mass, temperature, time, speed and data size (kB vs KiB). Returns the exact fraction, a decimal, the factor and its source. Input: value (decimal, 1e6 or 1/3), from, optional to (default all), decimals. Offline.

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>"
    },
    "name": "unit_convert"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoTarget unit of the same kind, or all (default): every unit of that kind
fromYesUnit of the value, e.g. mi, km, lb, kg, F, C, GiB, MB, gal, l, mph, acre (symbols or names)
trialNoOptional. true = free if a trial call is left (3 per IP per UTC day), else the payment terms.
valueYesNumber to convert: decimal (12.5), scientific (1e6) or fraction (1/3), up to 100 characters
decimalsNoDecimal places in "value", 0-30 (default 12); "fraction" is always exact12

Output Schema

NameRequiredDescriptionDefault
toolNo
cacheNo
inputNo
notesNo
_trialNoPresent when the call was a free trial call.
factorNo
resultNo
resultsNo
decimalsNo
providerNo
dimensionNo
price_usdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / trial / description
      Previous value: -"Optional. true = answer free if a trial call is left (3 per IP per UTC day); otherwise you get the payment terms."New value: +"Optional. true = free if a trial call is left (3 per IP per UTC day), else the payment terms."
  2. Changed2 schema fields changed
    • addedInput schema / properties / trial
      Added value: +{
      +  "description": "Optional. true = answer free if a trial call is left (3 per IP per UTC day); otherwise you get the payment terms.",
      +  "type": "boolean"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "anyOf": [
      +    {
      +      "required": [
      +        "tool",
      +        "input",
      +        "dimension"
      +      ]
      +    },
      +    {
      +      "properties": {
      +        "accepts": {
      +          "type": "array"
      +        },
      +        "error": {
      +          "type": "string"
      +        },
      +        "resource": {
      +          "type": "object"
      +        },
      +        "x402Version": {
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "x402Version",
      +        "accepts"
      +      ]
      +    },
      +    {
      +      "properties": {
      +        "charged": {
      +          "type": "boolean"
      +        },
      +        "error": {
      +          "type": "string"
      +        },
      +        "message": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "error"
      +      ]
      +    }
      +  ],
      +  "properties": {
      +    "_trial": {
      +      "description": "Present when the call was a free trial call.",
      +      "type": "object"
      +    },
      +    "cache": {
      +      "type": "object"
      +    },
      +    "decimals": {
      +      "type": "integer"
      +    },
      +    "dimension": {
      +      "type": "string"
      +    },
      +    "factor": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "input": {
      +      "type": "object"
      +    },
      +    "notes": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "price_usd": {
      +      "type": "number"
      +    },
      +    "provider": {
      +      "type": "string"
      +    },
      +    "result": {
      +      "properties": {
      +        "exact": {
      +          "type": "boolean"
      +        },
      +        "fraction": {
      +          "type": "string"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "number": {
      +          "type": "number"
      +        },
      +        "scientific": {
      +          "type": "string"
      +        },
      +        "source": {
      +          "type": "string"
      +        },
      +        "unit": {
      +          "type": "string"
      +        },
      +        "value": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "results": {
      +      "items": {
      +        "properties": {
      +          "exact": {
      +            "type": "boolean"
      +          },
      +          "fraction": {
      +            "type": "string"
      +          },
      +          "name": {
      +            "type": "string"
      +          },
      +          "number": {
      +            "type": "number"
      +          },
      +          "scientific": {
      +            "type": "string"
      +          },
      +          "source": {
      +            "type": "string"
      +          },
      +          "unit": {
      +            "type": "string"
      +          },
      +          "value": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "tool": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  3. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, closed-world), and the description adds genuinely new behavioral facts: the $0.002 x402/USDC-on-Base cost model, the 3-per-IP-per-UTC-day trial quota, and the guarantee that 'fraction' is always exact while 'value' is rounded to decimals. These are things an agent must know before calling and cannot infer from the structured fields.

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?

Dense but efficient: pricing and trial mechanics are front-loaded, then purpose, then factors, then returns, then inputs. Some value is lost to the heavy parenthetical stacking and the run-on 'Input:' clause, but every sentence carries information rather than filler.

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

Completeness4/5

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

With an output schema present, the description needn't enumerate return fields, and it still sketches them (exact fraction, decimal, factor and its source). Annotations cover safety and the schema covers all five parameters, so what remains is only the unsurfaced overlap with the time_convert sibling.

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

Parameters3/5

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

Schema coverage is 100% and the schema already documents every parameter including the 'all' default for `to` and the decimal/scientific/fraction formats for `value`. The description's 'Input: value (decimal, 1e6 or 1/3), from, optional to (default all), decimals' is essentially a restatement, so the baseline 3 applies rather than a higher score for added meaning.

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 and resource ('Converts a value between units exactly') and immediately bounds the scope: exact rational factors from NIST SP 811/HB 44 across length, area, volume, mass, temperature, time, speed and data size. The embedded examples (inch = 0.0254 m, kB vs KiB) make the precision claim concrete enough to distinguish it from a generic calculator like math_eval.

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 clear routing for the payment dimension ('free trial: add "trial": true or use try_free') and states the tool is offline/deterministic. It does not address the one real ambiguity in the sibling set: 'time' is listed as a supported kind here while a separate time_convert tool exists, so an agent gets no explicit rule for choosing between them.

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.

Resources