Skip to main content
Glama
SoapyRED

FreightUtils MCP Server

ldm_calculator

Read-onlyIdempotent

Calculate loading metres (LDM) for European road freight pallet loads, check vehicle length, floor positions, and payload fit, and return utilisation and warnings.

Instructions

Calculate loading metres (LDM) for European road freight — how much trailer length a pallet load occupies. 1 LDM = 1 linear metre of a 2.4m-wide trailer; a standard artic is 13.6 LDM.

Provide a pallet preset OR custom length_mm + width_mm — omitting both errors with a usage hint. Behavior: deterministic; stackable=true with stack_height 2 or 3 divides the floor footprint accordingly; fits is true only when the load fits the vehicle's LENGTH, its pallet FLOOR POSITIONS and — when weight_kg is given — its max PAYLOAD; each failed limit is named in warnings[] with its numbers. Euro and UK pallets count as their own floor positions (pallet_spaces.basis says which), other footprints as Euro equivalents. The vehicle's floor positions are its record's own count only when that count is a floor count; a weight-limited or unverified count (the 7.5t rigid stores 8, its 6.1 x 2.4 m deck holds 15) is not, and the positions come from the deck instead — pallet_spaces.floor_positions_basis says which, record_count is the stored figure. Without weight_kg the payload is not checked: payload_checked is false and an info warning gives the payload. utilisation_percent is of the vehicle's length. Rate-limited: a limit error carries reset_at, the UTC time the allowance resets.

Returns: ldm, vehicle (name, length_m, max_payload_kg), utilisation_percent, pallet_spaces (used, available, basis, floor_positions_basis, floor_positions_note, record_count, record_count_basis), total_weight_kg, payload_checked, fits and warnings under result, plus confidence, _source and citation (the FreightUtils v1 response envelope). Field names as this package serves them (snake_case); the hosted /api/mcp endpoint serves the same fields in camelCase (e.g. total_cbm → totalCbm).

Related: vehicle_lookup (the trailer specs behind the vehicle presets), pallet_fitting_calculator (boxes onto one pallet), consignment_calculator (mixed lines including LDM).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
palletNoPallet preset: euro=1200x800mm, uk=1200x1000mm, half=800x600mm, quarter=600x400mm. Provide this OR length_mm + width_mm.
vehicleNoVehicle preset: artic = 13.6m curtainsider (default), rigid10 = DEPRECATED, removal in 3.0.0 (it still answers with the same figures and returns a DEPRECATED advisory in warnings[]; its 10 m length is published by no manufacturer for any rigid — use custom with vehicle_length_m, or artic), rigid75 = 7.5t rigid, luton = 3.5t Luton van, us53 = 53ft US/Canada trailer, us48 = 48ft US trailer, or custom. EU presets divide by the 2.40 m loading-metre convention; US trailers divide by their own 2.591 m internal width, because loading metres are not the North American pricing unit.
quantityNoNumber of pallets. Default: 1.
width_mmNoCustom pallet width in millimetres. Example: 980.
length_mmNoCustom pallet length in millimetres (use with width_mm instead of a preset). Example: 1140.
stackableNoWhether pallets can be double/triple-stacked — halves (or thirds) the floor footprint. Default: false.
weight_kgNoWeight per pallet in kg — enables the payload side of the fits check.
stack_heightNoStack height when stackable: 2 or 3. Default: 2.
vehicle_length_mNoCustom vehicle load length in metres (required when vehicle=custom).

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
    • addedInput schema / properties / quantity / maximum
      Added value: +9007199254740991
    • changedOutput schema / properties / result / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "properties": {
      -      "fits": {
      -        "type": [
      -          "boolean",
      -          "null"
      -        ]
      -      },
      -      "ldm": {
      -        "type": [
      -          "number",
      -          "null"
      -        ]
      -      },
      -      "meta": {
      -        "anyOf": [
      -          {
      -            "additionalProperties": {},
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "pallet_spaces": {
      -        "anyOf": [
      -          {
      -            "additionalProperties": true,
      -            "properties": {
      -              "available": {
      -                "type": [
      -                  "number",
      -                  "null"
      -                ]
      -              },
      -              "used": {
      -                "type": [
      -                  "number",
      -                  "null"
      -                ]
      -              }
      -            },
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "total_weight_kg": {
      -        "type": [
      -          "number",
      -          "null"
      -        ]
      -      },
      -      "utilisation_percent": {
      -        "type": [
      -          "number",
      -          "null"
      -        ]
      -      },
      -      "vehicle": {
      -        "anyOf": [
      -          {
      -            "additionalProperties": true,
      -            "properties": {
      -              "length_m": {
      -                "type": [
      -                  "number",
      -                  "null"
      -                ]
      -              },
      -              "max_payload_kg": {
      -                "type": [
      -                  "number",
      -                  "null"
      -                ]
      -              },
      -              "name": {
      -                "type": [
      -                  "string",
      -                  "null"
      -                ]
      -              }
      -            },
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "warnings": {
      -        "anyOf": [
      -          {
      -            "items": {},
      -            "type": "array"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": {},
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": true,
      +    "properties": {
      +      "fits": {
      +        "type": [
      +          "boolean",
      +          "null"
      +        ]
      +      },
      +      "ldm": {
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "meta": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": {},
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "pallet_spaces": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": true,
      +            "properties": {
      +              "available": {
      +                "type": [
      +                  "number",
      +                  "null"
      +                ]
      +              },
      +              "floor_positions_basis": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "used": {
      +                "type": [
      +                  "number",
      +                  "null"
      +                ]
      +              }
      +            },
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "payload_checked": {
      +        "type": [
      +          "boolean",
      +          "null"
      +        ]
      +      },
      +      "total_weight_kg": {
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "utilisation_percent": {
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "vehicle": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": true,
      +            "properties": {
      +              "length_m": {
      +                "type": [
      +                  "number",
      +                  "null"
      +                ]
      +              },
      +              "max_payload_kg": {
      +                "type": [
      +                  "number",
      +                  "null"
      +                ]
      +              },
      +              "name": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              }
      +            },
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "warnings": {
      +        "anyOf": [
      +          {
      +            "items": {},
      +            "type": "array"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": {},
      +    "type": "object"
      +  }
      +]
  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. Changed2 schema fields changedv2.14.1
    • changedInput schema / properties / vehicle / description
      Previous value: -"Vehicle preset: artic 13.6m (default), rigid10 = 10m rigid, rigid75 = 7.5t rigid, luton van, or custom."New value: +"Vehicle preset: artic = 13.6m curtainsider (default), rigid10 = DEPRECATED, removal in 3.0.0 (it still answers with the same figures and returns a DEPRECATED advisory in warnings[]; its 10 m length is published by no manufacturer for any rigid — use custom with vehicle_length_m, or artic), rigid75 = 7.5t rigid, luton = 3.5t Luton van, us53 = 53ft US/Canada trailer, us48 = 48ft US trailer, or custom. EU presets divide by the 2.40 m loading-metre convention; US trailers divide by their own 2.591 m internal width, because loading metres are not the North American pricing unit."
    • changedInput schema / properties / vehicle / enum
      Previous value: -[
      -  "artic",
      -  "rigid10",
      -  "rigid75",
      -  "luton",
      -  "custom"
      -]New value: +[
      +  "artic",
      +  "rigid10",
      +  "rigid75",
      +  "luton",
      +  "us53",
      +  "us48",
      +  "custom"
      +]
  4. Changed10 schema fields changedv2.11.0
    • changedInput schema / properties / length_mm / description
      Previous value: -"Custom pallet length in mm (use instead of preset)"New value: +"Custom pallet length in millimetres (use with width_mm instead of a preset). Example: 1140."
    • changedInput schema / properties / pallet / description
      Previous value: -"Pallet preset. Euro=1200x800mm, UK=1200x1000mm, Half=800x600mm, Quarter=600x400mm"New value: +"Pallet preset: euro=1200x800mm, uk=1200x1000mm, half=800x600mm, quarter=600x400mm. Provide this OR length_mm + width_mm."
    • changedInput schema / properties / quantity / description
      Previous value: -"Number of pallets (default: 1)"New value: +"Number of pallets. Default: 1."
    • changedInput schema / properties / stack_height / description
      Previous value: -"Stack height: 2 or 3 (default: 2)"New value: +"Stack height when stackable: 2 or 3. Default: 2."
    • changedInput schema / properties / stackable / description
      Previous value: -"Can pallets be stacked? (default: false)"New value: +"Whether pallets can be double/triple-stacked — halves (or thirds) the floor footprint. Default: false."
    • changedInput schema / properties / vehicle / description
      Previous value: -"Vehicle type (default: artic 13.6m)"New value: +"Vehicle preset: artic 13.6m (default), rigid10 = 10m rigid, rigid75 = 7.5t rigid, luton van, or custom."
    • changedInput schema / properties / vehicle_length_m / description
      Previous value: -"Custom vehicle length in metres (required if vehicle=custom)"New value: +"Custom vehicle load length in metres (required when vehicle=custom)."
    • changedInput schema / properties / weight_kg / description
      Previous value: -"Weight per pallet in kg"New value: +"Weight per pallet in kg — enables the payload side of the fits check."
    • changedInput schema / properties / width_mm / description
      Previous value: -"Custom pallet width in mm (use instead of preset)"New value: +"Custom pallet width in millimetres. Example: 980."
    • 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": {
      +            "fits": {
      +              "type": [
      +                "boolean",
      +                "null"
      +              ]
      +            },
      +            "ldm": {
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            },
      +            "meta": {
      +              "anyOf": [
      +                {
      +                  "additionalProperties": {},
      +                  "type": "object"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "pallet_spaces": {
      +              "anyOf": [
      +                {
      +                  "additionalProperties": true,
      +                  "properties": {
      +                    "available": {
      +                      "type": [
      +                        "number",
      +                        "null"
      +                      ]
      +                    },
      +                    "used": {
      +                      "type": [
      +                        "number",
      +                        "null"
      +                      ]
      +                    }
      +                  },
      +                  "type": "object"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "total_weight_kg": {
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            },
      +            "utilisation_percent": {
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            },
      +            "vehicle": {
      +              "anyOf": [
      +                {
      +                  "additionalProperties": true,
      +                  "properties": {
      +                    "length_m": {
      +                      "type": [
      +                        "number",
      +                        "null"
      +                      ]
      +                    },
      +                    "max_payload_kg": {
      +                      "type": [
      +                        "number",
      +                        "null"
      +                      ]
      +                    },
      +                    "name": {
      +                      "type": [
      +                        "string",
      +                        "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. First observedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

Far exceeds what the annotations provide: it discloses the fits logic (length, floor positions, and payload only when weight_kg is given), how stackable/stack_height divide the footprint, when payload_checked is false, how floor positions are derived versus record counts, and that rate limits return reset_at. None of this is derivable from readOnlyHint/idempotentHint.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and input contract are front-loaded, but the middle is a dense semicolon-chained paragraph, and the 'Returns:' block enumerates fields the output schema already declares — wasted space given an output schema exists. Every claim is relevant, yet it could be trimmed considerably.

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 9-parameter calculator with edge cases (stacking, payload limits, deprecated presets, floor-position basis, rate limits), the description covers the behavior an agent needs and the annotations cover safety. Nothing essential 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?

With 100% schema coverage the baseline is 3, but the description adds genuine meaning the schema doesn't: 'Euro and UK pallets count as their own floor positions', that weight_kg is what activates the payload side of fits, and the LDM convention behind the vehicle presets. It stops short of a full per-parameter treatment, so not a 5.

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 and resource ('Calculate loading metres (LDM) for European road freight') and immediately defines the concept ('how much trailer length a pallet load occupies'), so an agent knows exactly what this computes. It also names its siblings (vehicle_lookup, pallet_fitting_calculator, consignment_calculator), separating this tool from adjacent calculators.

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?

Gives a clear input contract ('Provide a pallet preset OR custom length_mm + width_mm — omitting both errors with a usage hint') and routes to alternatives via the Related line. It doesn't state an explicit when-not-to-use case, but the sibling routing is concrete enough that an agent can pick correctly.

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