Skip to main content
Glama

Unit Converter

calc_units
Read-onlyIdempotent

Convert values between length, weight, and temperature units. Supports mm, cm, m, km, in, ft, yd, mi; g, kg, oz, lb; and c, f, k.

Instructions

Convert between different units of measurement.

Supported unit types:

  • length: mm, cm, m, km, in, ft, yd, mi

  • weight: g, kg, oz, lb

  • temperature: c, f, k (Celsius, Fahrenheit, Kelvin)

Examples: convert_units(5, "km", "mi", "length") # 5 kilometers → 3.11 miles convert_units(150, "lb", "kg", "weight") # 150 pounds → 68.04 kilograms

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYesNumeric value to convert, e.g., 100.0
to_unitYesTarget unit abbreviation. Valid units depend on unit_type: length (mm, cm, m, km, in, ft, yd, mi), weight (g, kg, oz, lb), temperature (c, f, k)
from_unitYesSource unit abbreviation. Valid units depend on unit_type: length (mm, cm, m, km, in, ft, yd, mi), weight (g, kg, oz, lb), temperature (c, f, k)
unit_typeYesUnit category: length, weight, or temperature

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYes
valueYes
to_unitYes
from_unitYes
unit_typeYes
difficultyYes
converted_valueYes
Behavior3/5

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

Annotations already provide readOnlyHint and idempotentHint. The description adds supported types and examples, which are consistent but do not reveal additional behavioral traits beyond the tool's obvious nature.

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?

Description is concise, well-structured with bullet points and examples, front-loaded with purpose. Every sentence adds value, no fluff.

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 the tool's simplicity, the description covers purpose, supported types, parameters, and examples. Output schema is present, so return values do not need explanation.

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%, baseline 3. Description adds value by grouping units by type and showing example conversions, clarifying parameter usage beyond schema descriptions.

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 clearly states 'Convert between different units of measurement' and lists supported unit types. It distinguishes itself from sibling calculation tools by being the only unit conversion tool.

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

Usage Guidelines3/5

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

The description implies usage for unit conversion with listed types, but does not explicitly state when to use this tool versus alternatives (e.g., for non-unit calculations). No exclusions or when-not-to-use guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/clouatre-labs/math-mcp-learning-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server