Skip to main content
Glama

Units

units
Read-only

Convert a value between units of length, area, volume (US customary and metric, cooking measures), mass, speed, pressure, energy, power, data size (SI and binary), time and temperature. Factors are exact to the definitions in NIST SP 811 (international inch and pound, US gallon, calorie IT, Btu IT, mechanical horsepower). An unknown unit is a 400 that lists every supported unit. Pure code, no outside source. Price: $0.002 in USDC per successful call, paid with x402 (Base, Solana or Arc); failed calls are not charged.

Input Schema

NameRequiredDescriptionDefault
toYesUnit to convert to, of the same kind, e.g. km, lb, C, MB
fromYesUnit to convert from, e.g. mi, kg, F, GiB, kWh, gal_us
valueYesThe number to convert, up to 1e15 in size

Output Schema

NameRequiredDescriptionDefault
toNo
fromNo
valueNo
familyNo
resultNo
sourceNo
checkedAtNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior3/5

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

Beyond the annotations the description adds real value: exactness provenance (NIST SP 811), pricing per successful call with the payment rail, a no-charge guarantee for failed calls, and defined 400 behavior on unknown units. However it also declares 'Pure code, no outside source', which conflicts with the openWorldHint=true annotation and would lead an agent to the opposite expectation about external dependencies.

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?

One dense paragraph that front-loads the capability and category coverage, then layers exactness, error behavior, and price in decreasing priority. Every sentence carries information, though the NIST/factor-definition sentence is arguably detail the agent rarely needs at call time.

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, return values need not be explained, and the description covers the remaining gaps an agent cares about: supported unit families, same-kind matching, error semantics, and cost. Only the openWorldHint tension keeps it from a 5.

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 all three parameters carry examples (mi, kg, F, GiB, gal_us / km, lb, C, MB), so the schema already does the heavy lifting. The description contributes only indirect semantics — that from/to must be 'of the same kind' and that unknown names yield a unit-listing 400 — which is useful but not additive enough to exceed the baseline.

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?

The description opens with a specific verb and resource — 'Convert a value between units' — and then enumerates the full category set (length, area, volume, mass, speed, pressure, energy, power, data size, time, temperature). That enumeration lets an agent separate this from near neighbors like crypto_convert, fx (currency) and distance without opening the schema.

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?

Category enumeration implicitly defines the usable domain, and 'An unknown unit is a 400 that lists every supported unit' gives an explicit recovery path when the agent guesses a unit name wrong. What is missing is any explicit routing statement naming an alternative tool (e.g. fx for currency or crypto_convert for tokens), so it stops short of 5.

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