Skip to main content
Glama

convert_units

Convert values between units of length, mass, temperature, speed, and more. Supports metric, imperial, data sizes, and pressure via dimensional analysis.

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

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed6 schema fields changedv0.2.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / from_unit / title
      Added value: +"From Unit"
    • addedInput schema / properties / to_unit / title
      Added value: +"To Unit"
    • addedInput schema / properties / value / title
      Added value: +"Value"
    • addedInput schema / title
      Added value: +"convert_unitsArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  2. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations provided, the description carries the full transparency burden. It discloses that conversion uses sympy and lists supported dimensions, but it does not describe return format, invalid-unit behavior, case sensitivity, or precision. This is useful context but leaves notable behavioral gaps.

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 with the core action. The supported-categories list, examples, and pointer to list_units each add value without redundant filler, and the entire description is easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is reasonably complete for a simple conversion tool, covering scope and examples. However, there is no output schema, no annotations, and no mention of return values or error behavior. Additionally, the sibling data_sizes tool may overlap with data-size conversions, but the description does not clarify the relationship.

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 0%, so the description must compensate for parameter meaning. The examples ('60','mph','km/h'), ('100','celsius','fahrenheit'), and ('1','gb','mib') illustrate the value/from_unit/to_unit ordering and alias usage, but the description does not explicitly define each parameter or mention constraints like case sensitivity.

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 and resource: 'Convert a value between units (dimensional analysis via sympy).' It clearly enumerates supported unit categories and provides concrete examples, making the tool's purpose unmistakable and distinct from siblings like list_units or calc_exact.

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 gives clear context on what the tool handles (metric/imperial length, mass, temperature, data sizes, etc.) and directs users to list_units for the full alias table. It does not explicitly state when not to use this tool versus siblings like data_sizes, but the supported categories and examples make the intended usage clear.

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

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