Skip to main content
Glama

unit_convert

Convert numeric values between length, mass, and temperature units, including km to miles, pounds to kilograms, and Celsius to Fahrenheit. Handles exact factor-based conversions only.

Instructions

Convert a value between units of length (mm, cm, m, km, inch, foot, yard, mile), mass (mg, g, kg, tonne, ounce, pound) or temperature (celsius, fahrenheit, kelvin) and return the converted number. Pure and stateless, no side effects, no auth beyond the group's key. Units are matched case-insensitively by the names listed; an unknown unit or a conversion across families (length to mass) returns a tool error (isError) naming the accepted units. Use it for exact factor-based conversions; it does not handle currencies, dates or compound units such as km/h.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYesthe quantity to convert, in from_unit
to_unitYesunit of the result, same family as from_unit
from_unitYesunit of value, e.g. km, pound, celsius

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYesvalue expressed in to_unit

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.7.1

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: pure/stateless, no side effects, no auth beyond the group key, case-insensitive unit matching, and explicit error semantics (tool error with isError naming accepted units on unknown unit or cross-family conversion). That is unusually complete behavioral disclosure for a stateless utility.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads purpose and return value in the first sentence, then behavior, then routing guidance. Every clause carries distinct information (units, families, case rules, error behavior, exclusions) with no filler.

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?

An output schema exists, so return formatting need not be elaborated, yet the description still states the result is a converted number. Combined with the auth, statelessness and error details, an agent has everything needed to call this correctly with three required parameters.

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 description coverage is 100%, so the baseline is 3; the description still adds real value by listing the accepted unit names, stating that matching is case-insensitive, and defining the cross-family failure mode for from_unit/to_unit. It stops short of documenting numeric ranges or precision/rounding behavior for value.

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?

Names a specific verb (convert) and resource (units of length, mass, temperature) and enumerates the exact accepted unit symbols, so an agent knows precisely what domain this covers. It also carves itself apart from a generic calculator sibling by excluding currencies, dates and compound units like km/h.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"Use it for exact factor-based conversions; it does not handle currencies, dates or compound units such as km/h" gives an explicit when-to-use plus a concrete when-not-to-use set. Although it does not name the sibling tools, the exclusions are the operationally relevant routing signal and leave nothing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools