Skip to main content
Glama

EAN Check barcode and shipping tools

freight_class

Read-onlyIdempotent

Work out the density (pounds per cubic foot) and the freight class of a US LTL shipment on the NMFC density scale with 13 steps, in force since 2025-07-19. Each line is one piece size: length x width x height x weight of one piece, and optionally x number of pieces. Up to 20 lines. A malformed line or unit gets an error, not a class.

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": "freight_class"
  }
}

Input Schema

NameRequiredDescriptionDefault
linesYesOne line per piece size, as LxWxHxWEIGHT or LxWxHxWEIGHTxPIECES (4 or 5 values), for example 48x40x48x500 or 24x18x12x30x3. The separator inside a line is x, X, × or *. Separate lines with a new line, a semicolon, or a comma followed by the next line (48x40x48x500, 24x18x12x30x3). A decimal comma inside a value is read as a decimal point (47,5 is 47.5). At most 20 lines: put pieces of the same size on one line with a piece count.
size_unitNoUnit of the sizes: in or cm (also inch, inches, centimeter(s), centimetre(s); any case). Default in.
weight_unitNoUnit of the weights: lb or kg (also lbs, pound(s), kgs, kilogram(s); any case). Default lb.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/closed-world, and the description adds substantive behavior: the 13-step scale and its in-force date 2025-07-19, a hard cap of 20 input lines, and explicit failure semantics (a malformed line or unit returns an error rather than a class). That failure-mode disclosure is exactly what an agent needs to validate before calling.

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?

Four short sentences, front-loaded with purpose followed by input shape, limits, and failure behavior. Nothing is redundant or filler; the error note earns its place because it signals that invalid input is not silently coerced.

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 does tell the agent that density and class are returned. It leaves minor ambiguity about whether results are per-line or an aggregated shipment density/class when multiple lines are supplied, which an agent might need to know how to present the answer.

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 is 3, but the description restates and reinforces the key semantic: each line is one piece size (LxWxHxWeight of a single piece) with an optional piece count, and 20 lines max. This clarifies the piece-vs-line distinction beyond the schema text, though it does not add unit-alias or separator details already in the schema.

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?

Specific verb+resource: it computes density in pounds per cubic foot and the NMFC freight class for a US LTL shipment. It names the exact scale (13-step NMFC density scale) and its effective date, so there is no ambiguity about what result comes back.

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?

The domain is stated precisely (US LTL, NMFC density scale), which implicitly excludes non-US or non-density shipments and non-LTL modes. No sibling here overlaps, so no alternative is named, but the applicability scope is clear and exclusions would only be inferred from the domain statement.

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