Skip to main content
Glama

curatedapi

Mass and weight converter

calc_units_mass
Read-only

Convert between metric, avoirdupois (pounds and ounces), troy and carat units.

Convert between metric, avoirdupois (pounds and ounces), troy and carat units. Conversion factors are exact values from the official unit definitions, so the result is exact before the single final rounding. Leave out to_unit to get the value in every supported unit.

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_unit": "<from_unit>"
    },
    "name": "calc_units_mass"
  }
}

Input Schema

NameRequiredDescriptionDefault
valueYesThe amount to convert. Allowed: >= 0.
optionsNoPrecision and rounding of the results (default: rounding=half_even, significant_digits=15).
to_unitNoUnit to convert to. Omit to convert to every unit. Options: kg: kilogram; g: gram; mg: milligram; ug: microgram; t: tonne (metric ton); lb: pound (avoirdupois); oz: ounce (avoirdupois); st: stone; short_ton: short ton (US); long_ton: long ton (UK); gr: grain; ozt: troy ounce; lbt: troy pound; ct: carat (metric)
from_unitYesUnit of the value. Options: kg: kilogram; g: gram; mg: milligram; ug: microgram; t: tonne (metric ton); lb: pound (avoirdupois); oz: ounce (avoirdupois); st: stone; short_ton: short ton (US); long_ton: long ton (UK); gr: grain; ozt: troy ounce; lbt: troy pound; ct: carat (metric)

Output Schema

NameRequiredDescriptionDefault
inputsYesThe inputs as understood.
resultYes
formulaNo
receiptNoOnly with ?receipt=true: a signed receipt for this answer, a JSON Web Token signed with Ed25519 (alg EdDSA). Its claims are iss, iat, jti (the request id), endpoint, date and response (this response without the receipt). Check it with the keys at /.well-known/jwks.json or POST /v1/receipts/verify.
warningsYes
exactnessYesFor each decimal output: exact; rounded (correctly, to the precision); rounded_uncertified (the last digit could not be proven); or underflow (below 1e-100, reported as 0).
precisionNoThe precision and rounding that were applied.
calculatorYesThe calculator and version that ran.
referencesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare the safety profile (readOnlyHint=true, destructiveHint=false, openWorldHint=false). The description adds genuinely useful behavior beyond that: conversion factors come from official definitions so results are exact before a single final rounding. It does not discuss precision defaults or what the all-units response looks like.

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?

Content is front-loaded and every idea is relevant, but the opening sentence is duplicated verbatim, which is pure waste in an otherwise tight three-sentence definition.

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?

With an output schema present, the description needn't describe return values, and parameter semantics are fully covered by the schema. Adding exactness and single-rounding guarantees covers the remaining behavior an agent would want for this pure conversion tool.

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%, including full enum descriptions for both unit lists, so the baseline is 3. The description only restates the omit-to_unit behavior already documented in the schema and adds that rounding is applied once, which adds little beyond the options object's own description.

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 the precise resource domain (metric, avoirdupois, troy, carat units), which makes it obviously distinct from the length/temperature/volume siblings. It never names an alternative tool explicitly, so it stops short of the top mark.

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?

Gives one concrete usage rule: leaving out to_unit returns the value in every supported unit. There is no guidance on when to prefer a specific to_unit over the all-units form, no exclusions, and no reference to alternatives among the sibling converters.

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