Skip to main content
Glama

Consignment Calculator

consignment_calculator
Read-onlyIdempotent

Calculate per-line and grand totals for a multi-item mixed consignment: CBM, loading metres (LDM), volumetric weight, and the mode-specific chargeable figure (air chargeable weight, sea revenue tonnes, road LDM), plus objective advisory flags.

Provide mode (sea | air | road, default road) and either lines[] (canonical — per line: quantity, dims {l,w,h,unit}, weight {value,unit}, optional description / hs_code / un_number / stackable) or the legacy flat items[] (dimensions in cm, weight in kg). Air uses an IATA volumetric divisor (default 6000, settable via options.air_volumetric_divisor); options.container_number / options.awb_number add a check-digit sanity flag.

Behavior: deterministic; flags are advisory only — implausible density, mode/option mismatch, dangerous-goods presence by UN number against ADR 2025, and container/AWB check-digit validity — and never state that a shipment is permitted or compliant. Invalid lines error naming the offending field. Canonical schema: https://www.freightutils.com/schema/consignment.v1.json. Rate-limited (anonymous use: 25 requests/day per IP): a 429 error body carries retry_after_seconds and a Retry-After header — back off and retry, or call get_subscribe_link for higher limits.

Returns: schema_version, mode, per_line[] (cbm, gross_weight_kg, density, volumetric_weight_kg, ldm, revenue_tonnes, chargeable_weight_kg), totals (incl. billing_basis) and flags[] under result, plus confidence, _source and citation (the FreightUtils v1 response envelope).

Limitations: best-effort deterministic calculation and reference data — not regulatory, customs or dangerous-goods compliance advice; classification, documentation and carrier acceptance remain your responsibility.

Related: cbm_calculator / chargeable_weight_calculator / ldm_calculator (single-figure versions), shipment_summary (adds vehicle/container suggestion and duty estimates), adr_lookup (what a flagged UN number is).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoTransport mode: sea | air | road (default road). Selects the chargeable-weight basis.
itemsNoDeprecated flat alias — dimensions in cm, weight in kg. Prefer "lines". Provide lines OR items.
linesNoCanonical consignment lines (preferred). Each: { quantity, dims:{l,w,h,unit}, weight:{value,unit}, optional description / hs_code / un_number / stackable }.
optionsNoOptional: { air_volumetric_divisor, container_number, awb_number }.

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. Dates show when Glama detected each change.

  1. Changed5 schema fields changed
    • 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"
      +]
  2. Changed1 schema field changed
    • 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": {},
      +                "propertyNames": {
      +                  "type": "string"
      +                },
      +                "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": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "ok": {
      +      "type": "boolean"
      +    },
      +    "result": {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "validity": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "as_of": {
      +          "type": "string"
      +        },
      +        "effective_from": {
      +          "type": "string"
      +        },
      +        "effective_to": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        }
      +      },
      +      "required": [
      +        "as_of"
      +      ],
      +      "type": "object"
      +    },
      +    "warnings": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "details": {
      +            "additionalProperties": {},
      +            "propertyNames": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "message": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "message"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "envelope_version",
      +    "ok",
      +    "result",
      +    "confidence",
      +    "_source",
      +    "citation"
      +  ],
      +  "type": "object"
      +}
  3. Changed17 schema fields changed
    • changedInput schema / properties / items / description
      Previous value: -"Array of consignment items"New value: +"Deprecated flat alias — dimensions in cm, weight in kg. Prefer \"lines\". Provide lines OR items."
    • changedInput schema / properties / items / items / properties / description / description
      Previous value: -"Item label"New value: +"Item description"
    • changedInput schema / properties / items / items / properties / gross_weight / description
      Previous value: -"Weight per piece in kg"New value: +"Gross weight per piece in kg"
    • addedInput schema / properties / items / items / properties / gross_weight / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / items / items / properties / hs_code
      Added value: +{
      +  "description": "Optional HS commodity code",
      +  "type": "string"
      +}
    • changedInput schema / properties / items / items / properties / pallet_type / description
      Previous value: -"Pallet type"New value: +"Pallet type (informational)"
    • changedInput schema / properties / items / items / properties / pallet_type / enum
      Previous value: -[
      -  "none",
      -  "euro",
      -  "uk",
      -  "us"
      -]New value: +[
      +  "none",
      +  "euro",
      +  "uk",
      +  "us",
      +  "custom"
      +]
    • changedInput schema / properties / items / items / properties / quantity / description
      Previous value: -"Number of pieces"New value: +"Number of pieces (default 1)"
    • changedInput schema / properties / items / items / properties / stackable / description
      Previous value: -"Can items be stacked?"New value: +"Can the item be stacked?"
    • addedInput schema / properties / items / items / properties / un_number
      Added value: +{
      +  "description": "Optional UN number for dangerous-goods reference",
      +  "type": "string"
      +}
    • changedInput schema / properties / items / items / required
      Previous value: -[
      -  "length",
      -  "width",
      -  "height",
      -  "quantity",
      -  "gross_weight"
      -]New value: +[
      +  "length",
      +  "width",
      +  "height",
      +  "gross_weight"
      +]
    • addedInput schema / properties / items / maxItems
      Added value: +50
    • addedInput schema / properties / items / minItems
      Added value: +1
    • addedInput schema / properties / lines
      Added value: +{
      +  "description": "Canonical consignment lines (preferred). Each: { quantity, dims:{l,w,h,unit}, weight:{value,unit}, optional description / hs_code / un_number / stackable }.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "description": {
      +        "description": "Optional item label",
      +        "maxLength": 200,
      +        "type": "string"
      +      },
      +      "dims": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "h": {
      +            "description": "Height in the given unit",
      +            "exclusiveMinimum": 0,
      +            "type": "number"
      +          },
      +          "l": {
      +            "description": "Length in the given unit",
      +            "exclusiveMinimum": 0,
      +            "type": "number"
      +          },
      +          "unit": {
      +            "description": "Dimension unit: mm | cm | m | in",
      +            "enum": [
      +              "mm",
      +              "cm",
      +              "m",
      +              "in"
      +            ],
      +            "type": "string"
      +          },
      +          "w": {
      +            "description": "Width in the given unit",
      +            "exclusiveMinimum": 0,
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "l",
      +          "w",
      +          "h",
      +          "unit"
      +        ],
      +        "type": "object"
      +      },
      +      "hs_code": {
      +        "description": "Optional HS commodity code",
      +        "pattern": "^\\d{6,10}$",
      +        "type": "string"
      +      },
      +      "quantity": {
      +        "description": "Number of identical pieces",
      +        "exclusiveMinimum": 0,
      +        "maximum": 100000,
      +        "type": "integer"
      +      },
      +      "stackable": {
      +        "description": "Whether the line may be stacked two-high (halves its loading-metre footprint)",
      +        "type": "boolean"
      +      },
      +      "un_number": {
      +        "description": "Optional UN number for dangerous-goods reference",
      +        "pattern": "^(UN)?\\d{4}$",
      +        "type": "string"
      +      },
      +      "weight": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "unit": {
      +            "description": "Weight unit: kg | g | t | lb",
      +            "enum": [
      +              "kg",
      +              "g",
      +              "t",
      +              "lb"
      +            ],
      +            "type": "string"
      +          },
      +          "value": {
      +            "description": "Gross weight per piece in the given unit",
      +            "exclusiveMinimum": 0,
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "value",
      +          "unit"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "quantity",
      +      "dims",
      +      "weight"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 50,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / mode
      Added value: +{
      +  "description": "Transport mode: sea | air | road (default road). Selects the chargeable-weight basis.",
      +  "enum": [
      +    "sea",
      +    "air",
      +    "road"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / options
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Optional: { air_volumetric_divisor, container_number, awb_number }.",
      +  "properties": {
      +    "air_volumetric_divisor": {
      +      "description": "IATA volumetric divisor in cm³/kg (default 6000). Only affects air.",
      +      "exclusiveMinimum": 0,
      +      "maximum": 10000,
      +      "type": "number"
      +    },
      +    "awb_number": {
      +      "description": "IATA 11-digit air waybill number — check-digit validated, advisory only",
      +      "maxLength": 20,
      +      "type": "string"
      +    },
      +    "container_number": {
      +      "description": "ISO 6346 container number — check-digit validated, advisory only",
      +      "maxLength": 20,
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "items"
      -]
  4. Changed11 schema fields changed
    • removedInput schema / properties / items / items / properties / grossWeightKg
      Removed value: -{
      -  "description": "Weight per piece in kg",
      -  "type": "number"
      -}
    • addedInput schema / properties / items / items / properties / gross_weight
      Added value: +{
      +  "description": "Weight per piece in kg",
      +  "type": "number"
      +}
    • addedInput schema / properties / items / items / properties / height
      Added value: +{
      +  "description": "Height in cm",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • removedInput schema / properties / items / items / properties / heightCm
      Removed value: -{
      -  "description": "Height in cm",
      -  "exclusiveMinimum": 0,
      -  "type": "number"
      -}
    • addedInput schema / properties / items / items / properties / length
      Added value: +{
      +  "description": "Length in cm",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • removedInput schema / properties / items / items / properties / lengthCm
      Removed value: -{
      -  "description": "Length in cm",
      -  "exclusiveMinimum": 0,
      -  "type": "number"
      -}
    • removedInput schema / properties / items / items / properties / palletType
      Removed value: -{
      -  "description": "Pallet type",
      -  "enum": [
      -    "none",
      -    "euro",
      -    "uk",
      -    "us"
      -  ],
      -  "type": "string"
      -}
    • addedInput schema / properties / items / items / properties / pallet_type
      Added value: +{
      +  "description": "Pallet type",
      +  "enum": [
      +    "none",
      +    "euro",
      +    "uk",
      +    "us"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / items / items / properties / width
      Added value: +{
      +  "description": "Width in cm",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • removedInput schema / properties / items / items / properties / widthCm
      Removed value: -{
      -  "description": "Width in cm",
      -  "exclusiveMinimum": 0,
      -  "type": "number"
      -}
    • changedInput schema / properties / items / items / required
      Previous value: -[
      -  "lengthCm",
      -  "widthCm",
      -  "heightCm",
      -  "quantity",
      -  "grossWeightKg"
      -]New value: +[
      +  "length",
      +  "width",
      +  "height",
      +  "quantity",
      +  "gross_weight"
      +]
  5. First observed

TDQS

A5/5.0
Behavior5/5

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

The description discloses that the tool is deterministic, flags are advisory only, it 'never state[s] that a shipment is permitted or compliant', and invalid lines error naming the offending field. It also states limitations (not regulatory/customs/DG compliance advice). These go well beyond the readOnly/idempotent annotations and do not contradict them.

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 description is long but well-structured with distinct labeled sections: input requirements, behavior, returns, limitations, and related tools. Every sentence carries operational value and the first sentence front-loads the core purpose.

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?

Given the tool's complexity (mode-dependent calculations, multiple input shapes, advisory flags, rate limits), the description covers inputs, outputs, error behavior, limitations, and related tools. The output schema exists, but the description's return summary and related-tool pointers ensure the agent has a complete mental model.

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?

Although schema coverage is 100%, the description adds meaningful semantics: default road mode, default air volumetric divisor (6000), canonical vs legacy input formats, and the check-digit sanity-flag purpose of options.container_number / options.awb_number. This goes far beyond the individual schema property descriptions.

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 opens with 'Calculate per-line and grand totals for a multi-item mixed consignment' — a specific verb+resource — and enumerates the computed outputs (CBM, loading metres, volumetric weight, mode-specific chargeable). It differentiates itself from siblings by naming cbm_calculator/chargeable_weight_calculator/ldm_calculator as 'single-figure versions'.

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?

The description explicitly says 'Provide mode (sea | air | road, default road) and either lines[] ... or the legacy flat items[]', telling the agent exactly what to pass. It also covers rate-limit handling (429 with retry_after_seconds, fallback to get_subscribe_link) and names related tools for alternative use cases.

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.

TDQS

A4.3/5.0
Disambiguation3/5

The tools cluster into clear domains and the descriptions are detailed, but there are several overlapping pairs: consignment_calculator vs shipment_summary, cbm_calculator vs unit_converter, and validate vs resolve_reference all have fuzzy boundaries. An agent could plausibly mis-select between the composite calculators or between identifier-handling tools despite the helpful cross-references.

Naming Consistency4/5

Naming is mostly consistent: reference tools use *_lookup, calculation tools use *_calculator, and checks use *_check. Exceptions like validate, resolve_reference, nearest_airport, and shipment_summary break the dominant pattern slightly, but all names are snake_case and generally predictable.

Tool Count3/5

At 25 tools, this sits at the heavy end of the range for an MCP server. The broad freight/logistics scope justifies many of them, but several single-purpose calculators could have been consolidated or grouped, making the surface feel larger and more redundant than necessary.

Completeness4/5

The server covers ADR dangerous-goods rules, multi-modal freight calculations, equipment lookups, identifier validation, customs/trade data, and emissions estimation. Minor gaps exist—no routing/geocoding, no SCAC/BIC coverage, no customs filing—but core freight-reference and calculation workflows are well supported.