Skip to main content
Glama

Convert units

convert_units
Read-only

Convert values between units of length, mass, time, volume, energy, temperature, pressure, speed, or flow rate. Accepts common spellings; rejects incompatible unit types.

Instructions

Convert a value between units of length, mass, time, volume, energy, temperature, pressure, speed or flow rate. Common spellings like ml, degC, °C and L/min are accepted. It refuses to convert one kind of unit into another.

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
toYesThe unit to convert it to.
fromYesThe unit it is in, like km, kg, mL, J, C, atm, km/h or L/min.
valueYesThe number to convert.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.2
    • changedInput schema / properties / from / description
      Previous value: -"The unit it is in, like km, kg, mL, J or C."New value: +"The unit it is in, like km, kg, mL, J, C, atm, km/h or L/min."
  2. First observedv0.1.1

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, and the description adds two genuine behavioral facts beyond them: tolerance for common spelling variants (ml, degC, °C, L/min) and a hard refusal on cross-dimension conversions. It doesn't describe the failure mode (exception vs. error field), which keeps it off a 5.

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?

Three short sentences: capability with scope first, accepted-input tolerance second, constraint last. No filler, and the most decision-relevant information is front-loaded.

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 three-parameter read-only converter with an output schema, the description covers the domain, accepted input forms, and the refusal case, so an agent can call it correctly. Only the shape of a failed conversion is left unstated, which is a minor gap given the tool's simplicity.

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 100%, so the baseline is 3. The description does add something extra: the accepted spelling variants, which partly compensate for the bare 'to' parameter description that carries no examples of its own, but this is marginal rather than a full explanation of value/from/to semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (convert) and resource (a value between units) and enumerates the nine supported dimensions, which is far more specific than the title. It does not name or contrast with any sibling tool, but the operation is unambiguous against molar_mass, balance_equation and round_sig_figs.

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?

Usage is implied by the enumerated unit categories and the stated limitation 'refuses to convert one kind of unit into another', which tells the agent the boundary condition. There is no explicit when-to-use versus alternatives or positive precondition guidance, so it lands at implied rather than explicit.

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