Skip to main content
Glama

Convert units

convert_units
Read-onlyIdempotent

Use this when the user asks to convert a numeric value between units of the same physical quantity: length, mass, temperature, area, volume, speed, time, data, energy, pressure, power, angle, fuel economy, force, frequency, density or torque. Unit symbols and common names are accepted. Do not use this for currency, live exchange rates or cross-quantity conversions that require density. Returns the converted value, detected quantity, exact factor and a conversion table.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYesValue to convert.
to_unitYesTarget unit symbol or name, e.g. 'km'.
from_unitYesSource unit symbol or name, e.g. 'mi', 'miles', '°C'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
linksNo
resultYes
requestYes
sourcesNo
successYes
versionNo
freshnessNo
timestampYes
next_actionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed15 schema fields changed
    • changedOutput schema / description
      Previous value: -"Unified result envelope (see /docs/response-format.md)"New value: +"Deterministic calculation result with typed values, units, formula, sources and timestamp."
    • addedOutput schema / properties / next_actions / items
      Added value: +{
      +  "type": "object"
      +}
    • addedOutput schema / properties / request / properties
      Added value: +{
      +  "calculator_id": {
      +    "type": "string"
      +  },
      +  "inputs": {
      +    "type": "object"
      +  },
      +  "tool": {
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / properties / result / properties / calculator_id
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / result / properties / calculator_name
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / result / properties / entity_type
      Added value: +{
      +  "const": "calculation",
      +  "type": "string"
      +}
    • addedOutput schema / properties / result / properties / status
      Added value: +{
      +  "const": "completed",
      +  "type": "string"
      +}
    • addedOutput schema / properties / result / properties / units / additionalProperties
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / result / properties / values / additionalProperties
      Added value: +true
    • addedOutput schema / properties / result / required
      Added value: +[
      +  "entity_type",
      +  "calculator_id",
      +  "status",
      +  "values",
      +  "formula",
      +  "summary"
      +]
    • addedOutput schema / properties / sources / items
      Added value: +{
      +  "type": "object"
      +}
    • addedOutput schema / properties / success / const
      Added value: +true
    • addedOutput schema / properties / timestamp / format
      Added value: +"date-time"
    • addedOutput schema / properties / version
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "success"
      -]New value: +[
      +  "success",
      +  "request",
      +  "result",
      +  "timestamp"
      +]
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the safety profile with readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds useful behavioral detail beyond those: accepted unit symbols/common names, the return contents (converted value, detected quantity, exact factor, conversion table), and the same-quantity constraint. This is meaningful but not exhaustive, e.g., no error behavior for unsupported units.

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?

The description is compact and front-loaded: the trigger appears first, followed by explicit exclusions and return behavior. Every sentence adds distinct information, and there is no filler or redundant restating of the title.

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 stateless, read-only conversion tool with full parameter schema coverage and an output schema, the description is complete. It specifies supported quantity classes, when not to use the tool, accepted input forms, and return contents. No critical selection or invocation information is missing.

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 description coverage is 100%, and the parameter descriptions already include examples like 'mi', 'miles', and '°C'. The description adds a general 'same physical quantity' constraint and notes that symbols/common names are accepted, but these are supplementary rather than essential given the schema already documents all three parameters.

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 action ('convert a numeric value between units of the same physical quantity') and explicitly enumerates the supported quantity types. It also distinguishes itself from other converters by excluding currency, live exchange rates, and density-dependent cross-quantity conversions, so an agent can tell when this tool applies.

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 provides a clear trigger condition ('Use this when the user asks to convert a numeric value between units of the same physical quantity') and explicit negative instructions ('Do not use this for currency, live exchange rates or cross-quantity conversions that require density'). It does not name sibling alternatives directly, but the when/when-not guidance is strong.

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