Skip to main content
Glama

convert_units

Convert a value between units for metric and imperial length, mass, time, speed, energy, power, pressure, temperature, volume, area, data, and frequency. Supports unit aliases.

Instructions

Convert a value between units (dimensional analysis via sympy).

Supports metric/imperial length, mass, time, speed, energy, power, force, pressure, temperature (°C/°F/K), volume, area, data sizes, frequency. Examples: ('60','mph','km/h'), ('100','celsius','fahrenheit'), ('1','gb','mib'). Use list_units for the full alias table.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYes
to_unitYes
from_unitYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations, the description must carry the transparency burden. It mentions 'dimensional analysis via sympy' and shows that temperature conversions and aliases are handled. Yet it does not disclose error behavior (e.g., for incompatible units), precision limits, or whether unsupported units raise errors. Output schema covers return values, but the description alone leaves some behavioral traits unspoken.

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 two sentences long, front-loaded with the core function, and includes indispensable examples. Every sentence adds value, and the reference to list_units is concise yet useful. No filler or redundant content.

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?

Given that an output schema exists, the description does not need to detail return structures. It thoroughly covers the tool's scope (all major unit categories), provides usage examples, and points to list_units for aliases. This is sufficient for an agent to select and invoke the tool correctly for a wide range of conversions.

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?

The schema has no descriptions (0% coverage), so the description must compensate. It does so with examples like ('60','mph','km/h'), which map to value, from_unit, and to_unit. It also directs users to list_units for valid unit aliases. However, it does not explicitly explain each parameter's meaning or formatting rules, relying on examples and schema types.

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 a value between units' and enumerates supported categories such as length, mass, temperature, and data sizes. Examples further clarify the exact input format, distinguishing it from sibling tools like radix_convert or base_repr.

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 clear usage context by listing supported unit domains and offering concrete examples. It also points to list_units for the full alias table, giving an alternative tool reference. However, it lacks explicit 'when not to use' exclusions or comparisons with other conversion tools like data_sizes.

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/The-40-Thieves/codecalc'

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