Skip to main content
Glama
FreightUtils MCP Server

FreightUtils MCP Server

unit_converter

Read-onlyIdempotent

Convert freight weight, volume, and length units using exact legal factors, including CBM to chargeable weight and freight tonnes for air and sea shipments.

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

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

NameRequiredDescriptionDefault
okYes
_metaNo
as_ofNo
resultYes
statusNo
_sourceYes
editionNo
citationYes
validityNo
warningsNo
confidenceYes
missing_inputsNo
blocking_errorsNo
envelope_versionYes
normalized_inputNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.27.0
    • addedOutput schema / properties / _meta / properties / check_id
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / _meta / properties / edition_basis
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / _meta / properties / receipt
      Added value: +{
      +  "additionalProperties": {},
      +  "properties": {
      +    "created_at": {
      +      "type": "string"
      +    },
      +    "dataset_version": {
      +      "additionalProperties": {
      +        "type": "string"
      +      },
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "engine_version": {
      +      "type": "string"
      +    },
      +    "inputs": {},
      +    "reason": {
      +      "const": "key_required",
      +      "type": "string"
      +    },
      +    "receipt_hash": {
      +      "type": "string"
      +    },
      +    "result": {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "schema_version": {
      +      "type": "string"
      +    },
      +    "stored": {
      +      "const": false,
      +      "type": "boolean"
      +    },
      +    "tool": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "stored",
      +    "reason",
      +    "schema_version",
      +    "receipt_hash",
      +    "created_at",
      +    "tool",
      +    "inputs",
      +    "dataset_version",
      +    "engine_version",
      +    "result"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / _meta / properties / receipt_url
      Added value: +{
      +  "type": "string"
      +}
  2. Changed10 schema fields changedv2.24.0
    • addedOutput schema / properties / _meta
      Added value: +{
      +  "additionalProperties": {},
      +  "properties": {
      +    "identify": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / as_of
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / blocking_errors / items / properties / recovery / properties / params / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / edition
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "applies_from": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "may_apply_until": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "name": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "applies_from",
      +        "may_apply_until"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • changedOutput schema / properties / envelope_version / enum
      Previous value: -[
      -  "1",
      -  "1.1"
      -]New value: +[
      +  "1",
      +  "1.1",
      +  "1.2"
      +]
    • addedOutput schema / properties / missing_inputs
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / normalized_input / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / properties / result / anyOf
      Previous value: -[
      -  {
      -    "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"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": {},
      +    "properties": {
      +      "formula": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "input": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": {},
      +            "properties": {
      +              "name": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "unit": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "value": {
      +                "type": [
      +                  "number",
      +                  "null"
      +                ]
      +              }
      +            },
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "note": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "result": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": {},
      +            "properties": {
      +              "name": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "unit": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "value": {
      +                "type": [
      +                  "number",
      +                  "null"
      +                ]
      +              }
      +            },
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": {},
      +    "propertyNames": {
      +      "type": "string"
      +    },
      +    "type": "object"
      +  }
      +]
    • addedOutput schema / properties / status
      Added value: +{
      +  "enum": [
      +    "ok",
      +    "partial",
      +    "not_found",
      +    "unsupported",
      +    "ambiguous"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / warnings / items / properties / details / propertyNames
      Added value: +{
      +  "type": "string"
      +}
  3. 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
  4. 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"
      +]
  5. 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"
      +}
  6. 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"
      +]
  7. First observedv1.0.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, closed-world), and the description adds substantial context beyond them: deterministic exact factors, refusal behavior with accepted units listed by category, rate limiting with a reset_at field, and an explicit response envelope. The quotient values for chargeable_kg (6,000 divisor) and freight_tonnes (W/M) are also disclosed inline.

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 with the unit families and the special freight targets, then behavior, then returns, then related tools — a logical ordering. It is dense but slightly over-long: the 'Returns' paragraph largely restates what the existing output schema already declares, and the ton-weight note is a mild digression.

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?

For a three-parameter conversion tool with full annotations and an output schema, nothing material is missing: constraints, error/refusal behavior, rate limits, and sibling routing are all covered. The 'Related' line closes the loop on the other calculators in the same family.

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

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with enums, so the baseline is already high, yet the description still adds meaning: chargeable_kg and freight_tonnes are valid only FROM cbm, the exact divisors behind them, and the short/long/metric ton distinctions. An agent can pick the right enum pair without guessing.

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 ('Convert freight and logistics units') and enumerates the supported unit families plus the two freight-specific targets. It distinguishes itself from siblings by naming cbm_calculator and chargeable_weight_calculator with the specific conditions where those tools are the better fit.

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?

It gives explicit routing: use cbm_calculator when starting from dimensions, chargeable_weight_calculator when pieces or a custom divisor are involved. It also states the negative case — cross-dimension conversions and freight targets from a non-cbm source are refused — so the agent knows what not to attempt here.

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