Skip to main content
Glama

CalculatorLib

convert_units

Read-onlyIdempotent

Convert a value between units of one category (length, mass, temperature, area, volume, speed, data and 60 more). Names, symbols and common spellings work ("m", "ft", "lbs", "°C"). category is optional when the two units identify it; an unknown unit returns the category's unit list. Example: {"value":10,"from":"Meter","to":"Foot"}.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "value": "<value>",
      "from": "<from>",
      "to": "<to>"
    },
    "name": "convert_units"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesTarget unit (name or symbol).
fromYesSource unit (name or symbol).
valueYesNumeric value to convert.
categoryNoUnit category, e.g. length, mass, temperature, area, volume, speed. Optional when from/to belong to only one category; an unknown category returns the list of all 67.

Output Schema

NameRequiredDescriptionDefault
toYes
fromYes
valueYes
resultYes
categoryYes

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?

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered. The description contributes beyond that by disclosing input tolerance (names, symbols, common spellings) and the fallback behavior on an unrecognized unit, which is genuine behavioral context rather than a restatement of annotations.

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?

Two dense sentences plus an example, front-loaded with the core action and category list. The only wasted space is the restatement of category optionality and the unknown-category return, which the schema already documents verbatim.

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 read-only, idempotent conversion tool with an output schema and fully documented parameters, the description covers what the agent needs: accepted unit formats, category behavior, and error recovery. Nothing required to invoke it correctly is missing.

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 baseline is 3, but the description adds meaning the schema does not: that 'from'/'to' accept symbols and common spellings such as 'm', 'ft', 'lbs', '°C', plus a worked example. The category optionality text largely duplicates the schema's own wording, which keeps it from a 5.

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+resource ('Convert a value between units of one category') and immediately enumerates the domain (length, mass, temperature, area, volume, speed, data), which cleanly separates it from the calculator-oriented siblings. An agent can identify the task without consulting 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?

It gives concrete operating conditions: category is optional when the units disambiguate, and an unknown unit returns the category's unit list, which tells the agent how to recover from a bad input. It does not name alternatives or state when not to use the tool, but the purpose is narrow enough that no sibling routing is needed.

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