Skip to main content
Glama
SoapyRED

FreightUtils MCP Server

shipment_summary

Read-onlyIdempotent

Analyze composite shipments in one call: calculate volume, chargeable weight, road LDM, air volumetric weight, sea revenue tonnes, dangerous goods, and UK duty estimates.

Instructions

Composite shipment analysis in one call: volume (CBM), gross and chargeable weight, road LDM with pallet spaces and a vehicle suggestion (road mode), volumetric weight (air), revenue tonnes with a container suggestion (sea), dangerous-goods presence for items carrying un_number, and UK duty estimates for items carrying hs_code + customs_value.

Provide mode (road | air | sea | multimodal) and items[] (dims in cm, weight in kg PER ITEM, quantity; optional stackable, pallet_type, hs_code, un_number, customs_value PER ITEM, and adr_quantity — the TOTAL for the dangerous-goods line, all pieces together); origin/destination and incoterm refine the duty leg.

Behavior: calls the ldm_calculator, adr_lookup and uk_duty_calculator engines directly; CBM, volumetric weight and revenue tonnes are the same arithmetic inline rather than a call out. Road LDM uses the 2.40 m loading-metre convention divisor and, like ldm_calculator, treats an item with no stackable flag as NOT stacked. modeSpecific.palletSpaces is pallet FLOOR POSITIONS (the figure ldm_calculator reports); palletRows is the separate row count. The suggested vehicle is the smallest that holds the load by its length, its payload and its pallet floor positions — the record's own count when it is a floor count, otherwise worked from its deck (a 7.5t rigid holds 15 Euro pallets on the floor; modeSpecific.suggestedVehicleFloorPositions says which) — and trailerUtilisation is of that vehicle (utilisationBasis names it); the suggested container is the smallest dry box whose record holds the volume and payload. Sections that cannot run (e.g. duty without a customs value) surface in warnings instead of failing the whole call. Fields are checked by name: a field the tool does not read is refused with a tool error naming it and listing the accepted ones, never ignored. Rate-limited: a limit error carries reset_at, the UTC time the allowance resets.

Returns: mode, itemCount, totals {pieces, grossWeight, volumeCBM, chargeableWeight, billingBasis}, modeSpecific (LDM / pallet floor positions / pallet rows / suggested vehicle, or revenue tonnes / container), warnings and dataVersion (road mode attributes the vehicle dataset and the LDM divisor) under result — note this composite's result uses camelCase field names (legacy shape); plus confidence, _source and citation (the FreightUtils v1 response envelope).

Limitations: a planning summary, not a quotation or compliance determination.

Related: consignment_calculator (canonical snake_case lines[] shape with advisory flags), cbm_calculator, chargeable_weight_calculator, ldm_calculator, adr_lookup, uk_duty_calculator. ldm_calculator, adr_lookup and uk_duty_calculator are the engines this actually calls; the rest are the single-purpose equivalents of arithmetic it does inline.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYesTransport mode — selects the mode-specific section of the result.
itemsYesShipment items with dimensions, weight and optional HS/UN codes.
originNoOrigin — ISO country code and optional UN/LOCODE.
incotermNoIncoterms 2020 three-letter code. Examples: "DAP", "EXW", "FOB".
destinationNoDestination — ISO country code and optional UN/LOCODE.
freight_costNoFreight cost in GBP for the duty calculation, 0 or more. Default: 0.
insurance_costNoInsurance cost in GBP for the duty calculation, 0 or more. Default: 0.

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. Changed13 schema fields changedv2.22.3
    • changedInput schema / properties / freight_cost / description
      Previous value: -"Freight cost in GBP for the duty calculation."New value: +"Freight cost in GBP for the duty calculation, 0 or more. Default: 0."
    • addedInput schema / properties / freight_cost / minimum
      Added value: +0
    • changedInput schema / properties / insurance_cost / description
      Previous value: -"Insurance cost in GBP for the duty calculation."New value: +"Insurance cost in GBP for the duty calculation, 0 or more. Default: 0."
    • addedInput schema / properties / insurance_cost / minimum
      Added value: +0
    • changedInput schema / properties / items / items / properties / adr_quantity / description
      Previous value: -"OPTIONAL ADR 1.1.3.6.3 quantity for this dangerous-goods line, in adr_quantity_unit. SEPARATE from weight, which is gross package mass — 1.1.3.6.3 counts none of its four categories that way. Supply both on EVERY dangerous-goods line and adrFlags.totalPoints is calculated; omit either and it stays null."New value: +"OPTIONAL ADR 1.1.3.6.3 quantity for this dangerous-goods line — the total for the whole line, all pieces together (never per piece), in adr_quantity_unit. SEPARATE from weight, which is gross package mass — 1.1.3.6.3 counts none of its four categories that way. Supply both on EVERY dangerous-goods line and adrFlags.totalPoints is calculated; omit either and it stays null."
    • addedInput schema / properties / items / items / properties / adr_quantity / maximum
      Added value: +1000000000
    • changedInput schema / properties / items / items / properties / customs_value / description
      Previous value: -"Customs value per item in GBP — enables the duty section."New value: +"Customs value in GBP PER ITEM (per piece), 0 or more — multiplied by quantity for the line; the duty estimate uses the sum over all lines. Enables the duty section with hs_code."
    • addedInput schema / properties / items / items / properties / customs_value / minimum
      Added value: +0
    • addedInput schema / properties / items / items / properties / quantity / maximum
      Added value: +1000000
    • changedInput schema / properties / items / items / properties / weight / description
      Previous value: -"Gross weight per item in kg."New value: +"Gross weight in kg PER ITEM (per piece) — multiplied by quantity."
    • addedInput schema / properties / items / items / properties / weight / minimum
      Added value: +0
    • addedInput schema / properties / items / maxItems
      Added value: +50
    • addedInput schema / properties / items / minItems
      Added value: +1
  2. Changed2 schema fields changedv2.17.3
    • addedInput schema / properties / items / items / properties / adr_quantity
      Added value: +{
      +  "description": "OPTIONAL ADR 1.1.3.6.3 quantity for this dangerous-goods line, in adr_quantity_unit. SEPARATE from weight, which is gross package mass — 1.1.3.6.3 counts none of its four categories that way. Supply both on EVERY dangerous-goods line and adrFlags.totalPoints is calculated; omit either and it stays null.",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / items / items / properties / adr_quantity_unit
      Added value: +{
      +  "description": "Dimension of adr_quantity. CHECKED against the dimension 1.1.3.6.3 counts for the row — a litres entry given kilograms still withholds the total.",
      +  "enum": [
      +    "L",
      +    "kg"
      +  ],
      +  "type": "string"
      +}
  3. 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"
      +]
  4. Changed19 schema fields changedv2.11.0
    • changedInput schema / properties / destination / description
      Previous value: -"Destination location — ISO country code and optional UN/LOCODE"New value: +"Destination — ISO country code and optional UN/LOCODE."
    • changedInput schema / properties / freight_cost / description
      Previous value: -"Optional freight cost in GBP for duty calculation"New value: +"Freight cost in GBP for the duty calculation."
    • changedInput schema / properties / incoterm / description
      Previous value: -"Incoterms 2020 three-letter code (e.g. 'DAP', 'EXW', 'FOB')"New value: +"Incoterms 2020 three-letter code. Examples: \"DAP\", \"EXW\", \"FOB\"."
    • changedInput schema / properties / insurance_cost / description
      Previous value: -"Optional insurance cost in GBP for duty calculation"New value: +"Insurance cost in GBP for the duty calculation."
    • changedInput schema / properties / items / description
      Previous value: -"Array of shipment items with dimensions, weight, and optional HS/UN codes"New value: +"Shipment items with dimensions, weight and optional HS/UN codes."
    • changedInput schema / properties / items / items / properties / customs_value / description
      Previous value: -"Customs value per item in GBP"New value: +"Customs value per item in GBP — enables the duty section."
    • addedInput schema / properties / items / items / properties / description / description
      Added value: +"Optional item label."
    • changedInput schema / properties / items / items / properties / height / description
      Previous value: -"Height in cm"New value: +"Height in cm."
    • changedInput schema / properties / items / items / properties / hs_code / description
      Previous value: -"HS code for customs"New value: +"HS code — enables the duty section together with customs_value."
    • changedInput schema / properties / items / items / properties / length / description
      Previous value: -"Length in cm"New value: +"Length in cm."
    • changedInput schema / properties / items / items / properties / pallet_type / description
      Previous value: -"Pallet standard the item sits on, if any"New value: +"Pallet standard the item sits on, if any."
    • changedInput schema / properties / items / items / properties / quantity / description
      Previous value: -"Number of items"New value: +"Number of items."
    • changedInput schema / properties / items / items / properties / stackable / description
      Previous value: -"Whether this item can be stacked (affects pallet fitting calc)"New value: +"Whether this item can be stacked (affects pallet fitting)."
    • changedInput schema / properties / items / items / properties / un_number / description
      Previous value: -"UN number for dangerous goods"New value: +"UN number — enables the dangerous-goods section."
    • changedInput schema / properties / items / items / properties / weight / description
      Previous value: -"Gross weight per item in kg"New value: +"Gross weight per item in kg."
    • changedInput schema / properties / items / items / properties / width / description
      Previous value: -"Width in cm"New value: +"Width in cm."
    • changedInput schema / properties / mode / description
      Previous value: -"Transport mode"New value: +"Transport mode — selects the mode-specific section of the result."
    • changedInput schema / properties / origin / description
      Previous value: -"Origin location — ISO country code and optional UN/LOCODE"New value: +"Origin — ISO country code and optional UN/LOCODE."
    • 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": {
      +            "adr": {
      +              "anyOf": [
      +                {
      +                  "additionalProperties": {},
      +                  "type": "object"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "dataVersion": {
      +              "anyOf": [
      +                {
      +                  "additionalProperties": {},
      +                  "type": "object"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "disclaimer": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "duty": {
      +              "anyOf": [
      +                {
      +                  "additionalProperties": {},
      +                  "type": "object"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "itemCount": {
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            },
      +            "mode": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "modeSpecific": {
      +              "anyOf": [
      +                {
      +                  "additionalProperties": {},
      +                  "type": "object"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "totals": {
      +              "anyOf": [
      +                {
      +                  "additionalProperties": true,
      +                  "properties": {
      +                    "billingBasis": {
      +                      "type": [
      +                        "string",
      +                        "null"
      +                      ]
      +                    },
      +                    "chargeableWeight": {
      +                      "type": [
      +                        "number",
      +                        "null"
      +                      ]
      +                    },
      +                    "grossWeight": {
      +                      "type": [
      +                        "number",
      +                        "null"
      +                      ]
      +                    },
      +                    "pieces": {
      +                      "type": [
      +                        "number",
      +                        "null"
      +                      ]
      +                    },
      +                    "volumeCBM": {
      +                      "type": [
      +                        "number",
      +                        "null"
      +                      ]
      +                    }
      +                  },
      +                  "type": "object"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "warnings": {
      +              "anyOf": [
      +                {
      +                  "items": {},
      +                  "type": "array"
      +                },
      +                {
      +                  "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"
      +}
  5. Addedv2.1.1

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare read-only/idempotent/non-destructive/closed-world, yet the description adds substantial context beyond them: which engines it invokes versus computes inline, the 2.40 m LDM divisor and non-stacked default, palletSpaces-as-floor-positions vs palletRows, how the vehicle and container are chosen, that unrunnable sections surface in warnings, that unknown field names are refused with a tool error listing accepted ones, and rate-limit behavior carrying reset_at.

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 value proposition and organized into input / behavior / returns / limitations / related blocks. It is long and repeats some schema content (notably adr_quantity), but nearly every sentence conveys a distinct behavioral fact rather than filler.

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 composite with nested items, enums, output schema and multiple downstream engines, the description covers the full picture: required inputs, per-section enablement rules, fallback-to-warnings behavior, engine provenance, and an explicit 'planning summary, not a quotation or compliance determination' limitation. Redundant return-value detail is harmless given the output schema exists.

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%, so the baseline would be 3, but the description adds meaning the schema does not: dims in cm and weight in kg are PER ITEM (quantity multiplies), adr_quantity is a per-LINE total distinct from gross weight, and origin/destination/incoterm 'refine the duty leg'. It restates some schema text, but the cross-field clarifications earn the extra point.

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?

Opens with a concrete verb+resource ('Composite shipment analysis in one call') and enumerates exactly what it computes (volume, weights, LDM, volumetric weight, revenue tonnes, DG presence, duty). The Related section explicitly distinguishes this composite from the single-purpose siblings (ldm_calculator, adr_lookup, uk_duty_calculator are the engines it calls; cbm_calculator etc. are the inline equivalents). An agent can route correctly without opening another schema.

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

Usage Guidelines4/5

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

Tells the agent exactly what to supply (mode + items[]) and what optional inputs unlock which sections (hs_code + customs_value enable duty; un_number enables DG). The Related list clarifies which tools this one wraps versus duplicates, but it stops short of an explicit 'use X instead when Y' rule versus consignment_calculator, which is the closest sibling.

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