Skip to main content
Glama

MiaoToolbox (妙用盒)

单位换算(妙用盒)

convert_units
Read-onlyIdempotent

高精度确定性单位换算(11 个独立物理量纲、64 个单位,50 位十进制精度):长度/面积/体积/质量(含大陆常用市制亩/斤/尺)/温度/速度/存储(KB与KiB)/压强/能量(kcal=4184J)/功率(PS与hp)/角度。

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": {
      "category": "<category>",
      "value": "<value>",
      "from": "<from>",
      "to": "<to>"
    },
    "name": "convert_units"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYes目标单位 ID,必须属于所选 category
fromYes源单位 ID,必须属于所选 category
valueYes待换算数值(数字或数字字符串,绝对值 1e-30 至 1e30)
categoryYes物理量类别:length/area/volume/mass/temperature/speed/data/pressure/energy/power/angle

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / category / description
      Previous value: -"物理量类别:length / area / volume / mass / temperature / speed"New value: +"物理量类别:length/area/volume/mass/temperature/speed/data/pressure/energy/power/angle"
    • changedInput schema / properties / category / enum
      Previous value: -[
      -  "length",
      -  "area",
      -  "volume",
      -  "mass",
      -  "temperature",
      -  "speed"
      -]New value: +[
      +  "length",
      +  "area",
      +  "volume",
      +  "mass",
      +  "temperature",
      +  "speed",
      +  "data",
      +  "pressure",
      +  "energy",
      +  "power",
      +  "angle"
      +]
    • changedInput schema / properties / from / enum
      Previous value: -[
      -  "mm",
      -  "cm",
      -  "m",
      -  "km",
      -  "inch",
      -  "foot",
      -  "mile",
      -  "mm2",
      -  "cm2",
      -  "m2",
      -  "km2",
      -  "ha",
      -  "ml",
      -  "l",
      -  "cm3",
      -  "m3",
      -  "mg",
      -  "g",
      -  "kg",
      -  "tonne",
      -  "pound",
      -  "c",
      -  "f",
      -  "k",
      -  "ms",
      -  "kmh",
      -  "mph"
      -]New value: +[
      +  "nm",
      +  "um",
      +  "mm",
      +  "cm",
      +  "m",
      +  "km",
      +  "inch",
      +  "foot",
      +  "yard",
      +  "mile",
      +  "nmi",
      +  "chi",
      +  "cun",
      +  "li",
      +  "mm2",
      +  "cm2",
      +  "m2",
      +  "km2",
      +  "ha",
      +  "mu",
      +  "acre",
      +  "ft2",
      +  "in2",
      +  "ml",
      +  "l",
      +  "cm3",
      +  "m3",
      +  "us_gal",
      +  "us_fl_oz",
      +  "ft3",
      +  "ug",
      +  "mg",
      +  "g",
      +  "kg",
      +  "tonne",
      +  "pound",
      +  "oz",
      +  "ct",
      +  "jin",
      +  "liang",
      +  "c",
      +  "f",
      +  "k",
      +  "ms",
      +  "kmh",
      +  "mph",
      +  "knot",
      +  "bit",
      +  "byte",
      +  "kb",
      +  "mb",
      +  "gb",
      +  "tb",
      +  "kib",
      +  "mib",
      +  "gib",
      +  "tib",
      +  "pa",
      +  "kpa",
      +  "mpa",
      +  "bar",
      +  "atm",
      +  "psi",
      +  "mmhg",
      +  "j",
      +  "kj",
      +  "kcal",
      +  "wh",
      +  "kwh",
      +  "w",
      +  "kw",
      +  "mw",
      +  "ps",
      +  "hp",
      +  "deg",
      +  "rad",
      +  "grad"
      +]
    • changedInput schema / properties / to / enum
      Previous value: -[
      -  "mm",
      -  "cm",
      -  "m",
      -  "km",
      -  "inch",
      -  "foot",
      -  "mile",
      -  "mm2",
      -  "cm2",
      -  "m2",
      -  "km2",
      -  "ha",
      -  "ml",
      -  "l",
      -  "cm3",
      -  "m3",
      -  "mg",
      -  "g",
      -  "kg",
      -  "tonne",
      -  "pound",
      -  "c",
      -  "f",
      -  "k",
      -  "ms",
      -  "kmh",
      -  "mph"
      -]New value: +[
      +  "nm",
      +  "um",
      +  "mm",
      +  "cm",
      +  "m",
      +  "km",
      +  "inch",
      +  "foot",
      +  "yard",
      +  "mile",
      +  "nmi",
      +  "chi",
      +  "cun",
      +  "li",
      +  "mm2",
      +  "cm2",
      +  "m2",
      +  "km2",
      +  "ha",
      +  "mu",
      +  "acre",
      +  "ft2",
      +  "in2",
      +  "ml",
      +  "l",
      +  "cm3",
      +  "m3",
      +  "us_gal",
      +  "us_fl_oz",
      +  "ft3",
      +  "ug",
      +  "mg",
      +  "g",
      +  "kg",
      +  "tonne",
      +  "pound",
      +  "oz",
      +  "ct",
      +  "jin",
      +  "liang",
      +  "c",
      +  "f",
      +  "k",
      +  "ms",
      +  "kmh",
      +  "mph",
      +  "knot",
      +  "bit",
      +  "byte",
      +  "kb",
      +  "mb",
      +  "gb",
      +  "tb",
      +  "kib",
      +  "mib",
      +  "gib",
      +  "tib",
      +  "pa",
      +  "kpa",
      +  "mpa",
      +  "bar",
      +  "atm",
      +  "psi",
      +  "mmhg",
      +  "j",
      +  "kj",
      +  "kcal",
      +  "wh",
      +  "kwh",
      +  "w",
      +  "kw",
      +  "mw",
      +  "ps",
      +  "hp",
      +  "deg",
      +  "rad",
      +  "grad"
      +]
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint=false, and destructiveHint=false. The description adds meaningful behavioral context beyond annotations: deterministic conversion, 50-decimal precision, and exact factors such as kcal=4184J. It does not describe error handling or output formatting, but the core behavioral profile is well covered.

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 front-loaded and free of filler, but the long parenthetical category list is dense and could be more scannable. It is appropriately sized for the amount of scope information it conveys.

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?

Given the fully documented input schema and complete safety annotations, the description provides enough additional context for correct invocation. It leaves return-value shape and error behavior implicit, which is a minor gap for a conversion tool with no output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/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 still adds useful semantic detail about units beyond the schema, including mainland Chinese market units, the KB versus KiB distinction, and the exact kcal-to-joule factor.

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 states a specific verb and resource: high-precision deterministic unit conversion. It enumerates 11 physical dimensions and 64 units, making the scope clearly distinct from sibling tools such as convert_data_format, convert_timezone, and calculate_* tools.

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?

The supported categories imply when the tool applies, but the description does not explicitly state when to use it versus alternatives or when not to use it. The guidance is adequate but inferred from the category list rather than directly stated.

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.

Resources