Skip to main content
Glama
mcp-server-demo

mcp-server-demo

by mcvalosborne

Convert units

convert_units
Read-onlyIdempotent

Converts a numeric value between units in the same category, such as length, weight, or temperature, using unit names or abbreviations.

Instructions

Convert a number between units in the same category. Length: mm, cm, m, km, in, ft, yd, mi. Weight: mg, g, kg, oz, lb. Temperature: C, F, K. Names such as meter, pound, and celsius are accepted. Units from different categories cannot be converted.

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
toYesTarget unit, for example mi, kg, or F.
fromYesSource unit, for example km, lb, or C.
valueYesAmount to convert.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so safety is covered. The description adds real behavioral content beyond that: the cross-category rejection rule and the acceptance of long-form aliases. It omits rounding or precision behavior, which matters for numeric conversion, keeping it below 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?

The core operation is stated first, followed by the reference data an agent needs, with no filler sentences. The compact unit lists are dense but each one is load-bearing given the absence of enums in the schema.

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 scalar tool with full schema coverage and no output schema, the definition covers inputs and failure conditions thoroughly. The remaining gap is return-value shape (presumably a number in the target unit) and rounding, which an agent could reasonably want stated.

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 coverage is 100%, so value/from/to are already documented and the baseline is 3. However, the schema has no enums, and the description supplies the actual valid unit vocabulary and alias acceptance, which is genuine added meaning for the from/to parameters — marginally above baseline.

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?

States a specific verb and resource ("Convert a number between units") plus the scope restriction (same category). The enumeration of supported categories and symbols lets an agent confirm support without opening the schema, and it is clearly distinct from the word_count/fetch_page_title siblings.

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?

Gives clear operating conditions: units must be in the same category, and the three valid categories are listed with their members. It stops short of naming an alternative tool or describing what to do on a category mismatch, but no sibling performs conversion, so the guidance is effectively complete for selection.

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

Deploy Server

Other Tools