Skip to main content
Glama

EAN Check barcode tools

cbm_calculator

Read-onlyIdempotent

Work out the volume of a shipment in cubic metres (CBM) and cubic feet, how much of a 20 ft, 40 ft, 40 ft high cube and 45 ft high cube dry container it fills, how many pieces of one size go into each container by size, and, when weights are given, the chargeable weight for air freight (divisor 6000), courier (5000) and sea freight LCL (1 m3 = 1000 kg). Each line is one piece size: length x width x height, optionally x quantity, optionally x weight of one piece. Up to 20 lines. A malformed line, unit or divisor gets an error, not a volume.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "lines": "<lines>"
    },
    "name": "cbm_calculator"
  }
}

Input Schema

NameRequiredDescriptionDefault
linesYesOne line per piece size, as LxWxH, LxWxHxQUANTITY or LxWxHxQUANTITYxWEIGHT (3 to 5 values), for example 60x40x50x10x12 for ten cartons of 60 by 40 by 50 at 12 each. The separator inside a line is x, X, × or *. Separate lines with a new line or a semicolon (a comma followed by a space and the next line works too). A comma between digits inside a value is a decimal comma (47,5 is 47.5), with two exceptions that get an error, not a volume: a comma followed by exactly three digits (1,250 could be 1250 or 1.25: send one of them without the comma), and a comma that could also be a line break. Write decimals with a point to be safe. WEIGHT is the weight of one piece. At most 20 lines: put pieces of the same size on one line with a quantity.
divisorNoOptional. The carrier's own volumetric divisor in cubic centimetres per kilogram, for example 4000. Adds one more chargeable weight to the answer. From 100 to 100000.
may_turnNoOptional. true when a piece may be laid on its side for the count by size. Default false: the third value of each line stays the height, as for a loaded pallet or a this-side-up carton.
size_unitNoUnit of the sizes: mm, cm, m, in or ft (also the full names; any case). Default cm.
weight_unitNoUnit of the weights: kg or lb (also kgs, kilogram(s), lbs, pound(s); any case). Default kg.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only declare readOnly/idempotent/closed-world, so the description carries the rest and does so well: it discloses the 20-line cap, the error-not-guess behavior for malformed lines, units and divisors, and the default orientation assumption behind may_turn. It does not state the container capacity assumptions behind the fill percentages, which is the main remaining gap.

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 purpose and the full output list are front-loaded in the first sentence, and the second and third sentences cover line format and error behavior. The lead sentence is a run-on with many stacked clauses that would read better as a short bulleted list, but no sentence is filler.

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

Completeness4/5

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

With no output schema, the description correctly takes on the job of enumerating return values (volume in two units, container fill, pieces per container, three or four chargeable weights). Combined with the error semantics and unit defaults, an agent has enough to call it correctly; only the container-capacity and rounding assumptions are left implicit.

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

Parameters3/5

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

Schema description coverage is 100% and the schema text already spells out the line grammar, comma/decimal pitfalls, divisor range and unit lists, so the description largely restates it. It does add a small amount of framing ('weight of one piece', 'adds one more chargeable weight to the answer'), but the baseline of 3 is right when the schema does the heavy lifting.

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 names a concrete verb and resource set: CBM/cubic-foot volume, container fill for 20/40/40HC/45HC dry containers, pieces per container by size, and chargeable weight for air (6000), courier (5000) and LCL (1 m3 = 1000 kg). That is far more specific than the generic logistics siblings (freight_class, barcode_size) and an agent can tell immediately which one to call.

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?

It gives clear context for use — 'Each line is one piece size... optionally x weight' and 'when weights are given' for chargeable weight — so the agent knows what inputs trigger which outputs. It stops short of explicit when-not conditions or naming an alternative tool, so it does not reach the top band.

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.

Resources