Skip to main content
Glama
SoapyRED

FreightUtils MCP Server

unit_converter

Read-onlyIdempotent

Convert freight and logistics units for weight, volume, and length, including CBM to chargeable kg or freight tonnes, with exact legal factors and cited formulas.

Instructions

Convert freight and logistics units: weight (kg, lbs, oz, tonnes, short_tons, long_tons), volume (cbm, cuft, cuin, litres, gal_us, gal_uk), length (cm, inches, m, feet, mm), plus two freight-specific targets valid only FROM cbm — chargeable_kg (air volumetric weight at the IATA 6,000 divisor: m³ x 1,000,000 / 6000) and freight_tonnes (sea W/M, 1 CBM = 1 freight tonne).

Behavior: deterministic, on the exact legal factors (1 lb = 0.45359237 kg, 1 in = 2.54 cm); the response names both units and states the formula used. Cross-dimension conversions (e.g. kg to litres), a negative value and freight targets from a non-cbm source are refused with the accepted units listed by category. Note: short ton (US) = 2,000 lb, long ton (UK) = 2,240 lb, metric tonne = 2,204.6 lb. Rate-limited: a limit error carries reset_at, the UTC time the allowance resets.

Returns: input {value, unit, name}, result {value, unit, name}, formula and note under result, plus confidence, _source and citation (the FreightUtils v1 response envelope).

Related: cbm_calculator (dimensions to volume first), chargeable_weight_calculator (proper air billing weight with pieces and a custom divisor).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesTarget unit — any same-dimension unit, plus chargeable_kg and freight_tonnes (both only valid from cbm).
fromYesSource unit — weight (kg, lbs, oz, tonnes, short_tons, long_tons), volume (cbm, cuft, cuin, litres, gal_us, gal_uk) or length (cm, inches, m, feet, mm). Must be the same dimension as "to".
valueYesThe numeric value to convert, 0 or more. Example: 5.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
resultYes
_sourceYes
citationYes
validityNo
warningsNo
confidenceYes
blocking_errorsNo
envelope_versionYes
normalized_inputNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.22.3
    • changedInput schema / properties / value / description
      Previous value: -"The numeric value to convert. Example: 5."New value: +"The numeric value to convert, 0 or more. Example: 5."
    • addedInput schema / properties / value / minimum
      Added value: +0
  2. Changed5 schema fields changedv2.17.2
    • addedOutput schema / properties / _source / properties / authority_current_edition
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / _source / properties / checked_at
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / _source / properties / dataset_edition
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / envelope_version / const
      Removed value: -"1"
    • addedOutput schema / properties / envelope_version / enum
      Added value: +[
      +  "1",
      +  "1.1"
      +]
  3. Changed4 schema fields changedv2.11.0
    • changedInput schema / properties / from / description
      Previous value: -"Source unit — weight (kg, lbs, oz, tonnes, short_tons, long_tons), volume (cbm, cuft, cuin, litres, gal_us, gal_uk) or length (cm, inches, m, feet, mm)"New value: +"Source unit — weight (kg, lbs, oz, tonnes, short_tons, long_tons), volume (cbm, cuft, cuin, litres, gal_us, gal_uk) or length (cm, inches, m, feet, mm). Must be the same dimension as \"to\"."
    • changedInput schema / properties / to / description
      Previous value: -"Target unit — any source unit, plus the freight targets chargeable_kg and freight_tonnes (only valid from cbm)"New value: +"Target unit — any same-dimension unit, plus chargeable_kg and freight_tonnes (both only valid from cbm)."
    • changedInput schema / properties / value / description
      Previous value: -"The value to convert"New value: +"The numeric value to convert. Example: 5."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "_source": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "checked": {
      +          "type": "string"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "provenance_status": {
      +          "enum": [
      +            "verified",
      +            "pending-verification",
      +            "computed",
      +            "live"
      +          ],
      +          "type": "string"
      +        },
      +        "source_url": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "checked",
      +        "provenance_status"
      +      ],
      +      "type": "object"
      +    },
      +    "blocking_errors": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "message": {
      +            "type": "string"
      +          },
      +          "recovery": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "action": {
      +                "type": "string"
      +              },
      +              "params": {
      +                "additionalProperties": {},
      +                "type": "object"
      +              },
      +              "tool": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "action"
      +            ],
      +            "type": "object"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "message",
      +          "recovery"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "citation": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "qualifier": {
      +          "type": "string"
      +        },
      +        "text": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "text"
      +      ],
      +      "type": "object"
      +    },
      +    "confidence": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "basis": {
      +          "enum": [
      +            "deterministic",
      +            "provenance",
      +            "match_quality",
      +            "freshness"
      +          ],
      +          "type": "string"
      +        },
      +        "level": {
      +          "enum": [
      +            "high",
      +            "medium",
      +            "low"
      +          ],
      +          "type": "string"
      +        },
      +        "score": {
      +          "maximum": 1,
      +          "minimum": 0,
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "level",
      +        "basis"
      +      ],
      +      "type": "object"
      +    },
      +    "envelope_version": {
      +      "const": "1",
      +      "type": "string"
      +    },
      +    "normalized_input": {
      +      "additionalProperties": {},
      +      "type": "object"
      +    },
      +    "ok": {
      +      "type": "boolean"
      +    },
      +    "result": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": true,
      +          "properties": {
      +            "formula": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "input": {
      +              "anyOf": [
      +                {
      +                  "additionalProperties": true,
      +                  "properties": {
      +                    "name": {
      +                      "type": [
      +                        "string",
      +                        "null"
      +                      ]
      +                    },
      +                    "unit": {
      +                      "type": [
      +                        "string",
      +                        "null"
      +                      ]
      +                    },
      +                    "value": {
      +                      "type": [
      +                        "number",
      +                        "null"
      +                      ]
      +                    }
      +                  },
      +                  "type": "object"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "note": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "result": {
      +              "anyOf": [
      +                {
      +                  "additionalProperties": true,
      +                  "properties": {
      +                    "name": {
      +                      "type": [
      +                        "string",
      +                        "null"
      +                      ]
      +                    },
      +                    "unit": {
      +                      "type": [
      +                        "string",
      +                        "null"
      +                      ]
      +                    },
      +                    "value": {
      +                      "type": [
      +                        "number",
      +                        "null"
      +                      ]
      +                    }
      +                  },
      +                  "type": "object"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            }
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "additionalProperties": {},
      +          "type": "object"
      +        }
      +      ]
      +    },
      +    "validity": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "as_of": {
      +          "type": "string"
      +        },
      +        "effective_from": {
      +          "type": "string"
      +        },
      +        "effective_to": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "as_of"
      +      ],
      +      "type": "object"
      +    },
      +    "warnings": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "details": {
      +            "additionalProperties": {},
      +            "type": "object"
      +          },
      +          "message": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "message"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "envelope_version",
      +    "ok",
      +    "result",
      +    "confidence",
      +    "_source",
      +    "citation"
      +  ],
      +  "type": "object"
      +}
  4. Changed4 schema fields changedv2.5.0
    • changedInput schema / properties / from / description
      Previous value: -"Source unit code (e.g., \"kg\", \"cbm\", \"cm\")"New value: +"Source unit — weight (kg, lbs, oz, tonnes, short_tons, long_tons), volume (cbm, cuft, cuin, litres, gal_us, gal_uk) or length (cm, inches, m, feet, mm)"
    • addedInput schema / properties / from / enum
      Added value: +[
      +  "kg",
      +  "lbs",
      +  "oz",
      +  "tonnes",
      +  "short_tons",
      +  "long_tons",
      +  "cbm",
      +  "cuft",
      +  "cuin",
      +  "litres",
      +  "gal_us",
      +  "gal_uk",
      +  "cm",
      +  "inches",
      +  "m",
      +  "feet",
      +  "mm"
      +]
    • changedInput schema / properties / to / description
      Previous value: -"Target unit code (e.g., \"lbs\", \"cuft\", \"inches\")"New value: +"Target unit — any source unit, plus the freight targets chargeable_kg and freight_tonnes (only valid from cbm)"
    • addedInput schema / properties / to / enum
      Added value: +[
      +  "kg",
      +  "lbs",
      +  "oz",
      +  "tonnes",
      +  "short_tons",
      +  "long_tons",
      +  "cbm",
      +  "cuft",
      +  "cuin",
      +  "litres",
      +  "gal_us",
      +  "gal_uk",
      +  "cm",
      +  "inches",
      +  "m",
      +  "feet",
      +  "mm",
      +  "chargeable_kg",
      +  "freight_tonnes"
      +]
  5. First observedv1.0.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantial context beyond them: deterministic behavior on exact legal factors, refusal behavior with accepted units listed by category, the response naming both units and formula, and rate limiting with reset_at in the error. This is exactly the extra behavioral detail annotations cannot convey.

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?

Front-loaded with the core purpose and unit categories, then behavior, then returns, then related tools. Dense but well-organized; the ton-definition note is mildly extraneous but supports the stated exact-factor behavior, so little is wasted.

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

Completeness5/5

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

Though an output schema exists and return values needn't be spelled out, the description still summarizes the envelope, and it covers behavior, refusals, rate limits, and alternative tools. Nothing an agent needs to invoke this correctly is missing.

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 coverage is 100% and both enum params are documented, so the baseline is 3. The description adds genuine meaning beyond the schema by giving the actual conversion formulas for chargeable_kg (IATA 6,000 divisor) and freight_tonnes (W/M), and clarifying the ton variants.

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 (Convert) and the exact resource scope (freight/logistics units across weight, volume, length, plus two freight-specific targets). It names sibling tools cbm_calculator and chargeable_weight_calculator, so an agent can distinguish it without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes the agent: the 'Related' line gives cbm_calculator as the step for dimensions-to-volume and chargeable_weight_calculator for proper air billing with pieces/custom divisor. It also states hard usage constraints (freight targets only FROM cbm, cross-dimension and negative values refused), covering both when to use and when not.

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