Skip to main content
Glama

SimplyUtils

Convert units

convert_units
Read-only

Convert a number between two units of the same category and return a line such as "5 mi = 8.04672 km" (up to 10 significant digits). Units are matched by symbol or name, case-insensitive. Errors are returned for unknown units, units from another category, non-numeric values and temperatures below absolute zero. Months are 1/12 of a 365-day year. Units by category (symbols): length: m, km, mi, ft, in, cm, mm, yd, nmi; weight: kg, g, lb, oz, t, mg, st; temperature: °C, °F, K; volume: L, mL, gal, fl oz, cup, tbsp, m³; speed: km/h, mph, m/s, kn, ft/s; area: m², km², mi², ft², ac, ha; data: B, KB, MB, GB, TB, bit, KiB, MiB, GiB, TiB; time: s, min, h, d, wk, mo, yr, ms.

Input Schema

NameRequiredDescriptionDefault
toYesUnit symbol or name, e.g. mi or mile
fromYesUnit symbol or name, e.g. km or kilometer
valueYesA plain number such as 12.5, -40 or 1e6 (no commas or unit text)
categoryYesThe kind of quantity; both units must belong to it

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / category / description
      Added value: +"The kind of quantity; both units must belong to it"
    • changedInput schema / properties / value / description
      Previous value: -"A plain number, e.g. 12.5"New value: +"A plain number such as 12.5, -40 or 1e6 (no commas or unit text)"
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

The description adds substantial behavioral detail beyond the annotations: it specifies the output line format, precision up to 10 significant digits, case-insensitive matching, error conditions for unknown units, cross-category units, non-numeric values, and temperatures below absolute zero, plus the month convention. These details help the agent predict outcomes and handle errors.

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 return format, followed by constraints and a useful unit catalog. The long unit enumeration is dense but earns its place by preventing unknown-unit errors; there is little redundant wording.

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 fully covers return format, precision, error behavior, unit categories, and special conventions. It gives an agent everything needed to call the tool correctly and interpret its output.

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 schema already documents all four parameters. The description adds meaningful semantics beyond the schema by listing valid unit symbols per category, stating case-insensitive matching by symbol or name, and clarifying month and absolute-zero constraints.

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 states a specific verb and resource: convert a number between two units of the same category. It also specifies the return format, making the tool's purpose unambiguous and clearly distinct from siblings like convert_timestamp.

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?

Usage is clear from the description: units must be in the same category, and errors are returned for cross-category or unknown units. It does not explicitly name alternatives or when-not-to-use cases, but the context and constraints are sufficient for an agent to select it correctly.

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.