Skip to main content
Glama

reference-data-mcp-server

Unit Conversion

ref_unit_convert
Read-only

Convert a numeric value between compatible units of measure. Supports: length (mm, cm, m, km, in, ft, yd, mi), mass (mcg, mg, g, kg, oz, lb, mt = metric tonne / 1000 kg, t = US short ton / 907.18 kg), volume (ml, cl, dl, l, kl, tsp, Tbs, fl-oz, cup, pnt, qt, gal, m3), temperature (C, F, K, R — non-linear conversions handled), speed (m/s, km/h, knot, ft/s), pressure (Pa, kPa, MPa, hPa, bar, torr, psi), energy (J, kJ, Wh, kWh, MWh), power (W, mW, kW, MW, GW), frequency (Hz, kHz, MHz, GHz), digital storage (b, Kb, Mb, Gb, Tb, B, KB, MB, GB, TB), and angle (deg, rad, grad). Incompatible units (e.g., km to kg) return an error identifying the quantity mismatch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesTarget unit abbreviation (e.g., "mi", "F", "m/s", "kJ", "lb").
fromYesSource unit abbreviation (e.g., "km", "C", "m/h", "kWh", "kg").
valueYesNumeric quantity to convert.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
valueNoInput value as provided.
resultNoConverted value (full precision float).
measureNoPhysical quantity being measured (e.g., "length", "mass", "temperature").
to_unitNoTarget unit as recognized.
from_unitNoSource unit as recognized.
result_precisionNoHuman-readable rounded form of the result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

The readOnlyHint annotation already communicates safety, and the description adds meaningful behavioral context: non-linear temperature conversions are handled, unit aliases like 'mt' and 't' are defined with their base values, and mismatched quantities produce an error. Precision or rounding behavior is absent, but the output schema mitigates that gap.

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 description is front-loaded with the core action and then gives a dense but necessary inventory of supported units. Every sentence earns its place: the first states the purpose, the second lists admissible units, and the third explains failure behavior. The long unit lists could be more scannable with line breaks, but there is no wasted prose.

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?

For a conversion tool with three simple parameters, a read-only annotation, and an output schema, the description covers all needed information: supported categories, unit abbreviations, alias definitions, non-linear handling, and the mismatch error case. An agent can select and invoke this tool correctly without further inference.

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?

The input schema already documents value, from, and to with 100% coverage, so the baseline is 3. The description adds value by providing the accepted unit catalog, aliases, and category groupings, which directly informs what values can be passed to from and to.

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: 'Convert a numeric value between compatible units of measure.' It enumerates 11 supported quantity types and their unit abbreviations, making it easy to distinguish from sibling reference-lookup tools. The physical-unit scope also separates it from timezone_convert without ambiguity.

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?

Clearly scopes usage to compatible units and explicitly states that incompatible units return an error identifying the quantity mismatch. It does not explicitly name alternative tools or say when not to use it, but the detailed categorization of physical units makes the boundary reasonably clear.

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.