Skip to main content
Glama

Unit Converter

unit_convert
Read-onlyIdempotent

Convert a value from one unit to another within one kind of measure: length (mm, cm, m, km, in, ft, yd, mi, nmi), mass (mg, g, kg, t, oz, lb, st, short_ton, long_ton), volume (ml, l, m3, cm3, in3, ft3, yd3, fl_oz_us, pt_us, qt_us, gal_us, fl_oz_imp, pt_imp, qt_imp, gal_imp), area (mm2, cm2, m2, ha, km2, in2, ft2, yd2, acre, mi2), energy (j, kj, mj, wh, kwh, cal_th, kcal_th, cal_it, kcal_it, btu_it, ft_lbf), pressure (pa, hpa, kpa, mpa, bar, atm, torr, mmhg, psi) or temperature (degc, degf, k, degr). Send the value, from_unit and to_unit. Get back the converted value, the exact factor used (as a fraction and a decimal), and whether the value is exact or rounded. Temperature reads the value as a thermometer reading by default; send temperature_as difference for a temperature change (10 degC of warming is 18 degF of warming, not 50). Answer fields: ok, verdict, result, rule, does_not, sources, observation, signature, verify. Errors: ok false with the reason (bad input, too large, hourly limit). Free. No model, no network, nothing you send is stored by the tool, and every answer is signed with LLPRO's key (check it at https://llpro.ai/unit-convert). Not legal, tax or financial advice.

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

Input Schema

NameRequiredDescriptionDefault
valueYesThe number to convert (up to 15 digits and 6 decimals).
to_unitYesUnit to convert to. It must measure the same thing as from_unit.
from_unitYesUnit the value is in (code from the lists in the tool description; case does not matter).
temperature_asNoTemperature units only. reading (default): a thermometer reading. difference: a change in temperature (no offset).
significant_digitsNoDigits kept when the exact value does not end (default 12). Ignored when the answer is exact.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, yet the description still adds substantive behavior: an hourly rate limit surfaced as an error, an explicit no-storage/no-network privacy statement, signed answers with a verification URL, and the exact-vs-rounded result contract. That is well beyond what the annotations convey.

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?

The core instructions (send value/from_unit/to_unit, get result/factor/exactness) are front-loaded before the unit catalog and the boilerplate about privacy and signatures. The long unit lists partly duplicate the schema enums, but they also encode the family grouping the enum lacks, so they are not pure waste.

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?

With no output schema, the description takes on the burden of naming the response fields (ok, verdict, result, rule, observation, signature, verify) and the error modes, and it does so. For a stateless, closed-world conversion tool this covers everything an agent needs to call it and interpret the reply.

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 the baseline is 3, but the description earns more by grouping units into measure families (which the flat enum cannot express) and by explaining the reading-vs-difference distinction with a concrete arithmetic example. significant_digits is left entirely to the schema, which is a minor remaining gap.

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?

"Convert a value from one unit to another within one kind of measure" names a specific verb and resource, and the enumeration of the seven measure families plus their unit codes makes the scope unambiguous. An agent can tell instantly that this is a pure numeric conversion tool rather than a currency or time-zone converter like its siblings.

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?

The description gives a clear conditional rule for the one ambiguous case: "Temperature reads the value as a thermometer reading by default; send temperature_as difference for a temperature change," reinforced with the 10 degC/18 degF worked example. It does not, however, explicitly exclude adjacent cases such as time zones or currency, so the agent must infer that those belong to the sibling tools.

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