Skip to main content
Glama

Convert Units

convert_units
Read-onlyIdempotent

Convert between units: length, weight, temperature, volume, time, etc. Returns converted value. E.g., "5 m to ft", "100 kg to lbs", "32 degF to degC". Use for unit conversions.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

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

Input Schema

NameRequiredDescriptionDefault
toYesTarget unit (e.g., "cm", "lbs", "fahrenheit", "km/h")
fromYesSource unit (e.g., "inches", "kg", "celsius", "mph")
valueYesNumeric value to convert (e.g., 5)

Output Schema

NameRequiredDescriptionDefault
toYesThe target unit
inputYesThe input value with source unit
outputYesThe converted value with target unit

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "input": {
      +      "description": "The input value with source unit",
      +      "type": "string"
      +    },
      +    "output": {
      +      "description": "The converted value with target unit",
      +      "type": "string"
      +    },
      +    "to": {
      +      "description": "The target unit",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "input",
      +    "output",
      +    "to"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "from": "m",
      +    "to": "ft",
      +    "value": 5
      +  },
      +  {
      +    "from": "kg",
      +    "to": "lbs",
      +    "value": 100
      +  }
      +]
  3. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint=false, so the safety profile is known. The description adds that it returns a converted value and illustrates supported unit formats, but doesn't disclose edge-case behaviors like error handling or 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short and front-loaded with the core purpose. It includes somewhat redundant phrases like 'Returns converted value' and 'Use for unit conversions' that could be trimmed, but overall it is efficient and well-structured.

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

Completeness4/5

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

For a simple conversion tool, the description, schema, annotations, and output schema together provide sufficient context. The examples clarify usage, and the categories set expectations. Missing error handling details are not critical for such a benign operation.

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 100% description coverage for all three parameters, each with examples. The description adds examples of unit expressions (e.g., 'm to ft', 'degF to degC') but doesn't substantially expand beyond what the schema already provides, so baseline 3 is appropriate.

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 the tool converts units, lists supported categories (length, weight, temperature, volume, time), and provides concrete examples. This makes its purpose unambiguous and distinguishes it from the unrelated sibling tools.

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 explicitly says 'Use for unit conversions' and gives examples of input formats, providing clear context for when to invoke the tool. However, it doesn't name alternatives or state when not to use it, so it lacks exclusions but is still clear.

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.