Skip to main content
Glama

Moltline Shipping Maths

Parcel Fit

parcel_fit
Read-onlyIdempotent

Pick the smallest box an item actually fits in, allowing for padding. FREE.

Tries every rotation of the item against every box, so an item that only fits diagonally-oriented is still found. Typical input {"item_length": 10, "item_width": 6, "item_height": 4, "box_options": [[12, 9, 4], [14, 10, 6]]} returns {"fits": [{"box": [14, 10, 6], "cubic": 840.0, "slack": [2, 2, 0]}], "best": [14, 10, 6], "rejected": [...]}.

Use when choosing packaging from stock. Not for what the carrier will bill once a box is chosen: that is dim_weight. Errors: on invalid, missing, or malformed input this tool never raises a protocol error; it returns {"error": ""} (for example {"error": "box_options must contain at least one [l, w, h] box"}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.

Input Schema

NameRequiredDescriptionDefault
paddingNoCushioning allowance added to every item side before the comparison, in the same unit. Default 1.0; use 0 for a bare fit.
item_widthYesItem's second side, same unit. Must be greater than 0.
box_optionsYesCandidate inner box dimensions, each a list of exactly three positive numbers, e.g. [[12, 9, 4], [14, 10, 6]].
item_heightYesItem's third side, same unit. Must be greater than 0.
item_lengthYesItem's longest side, in inches. Must be greater than 0.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, yet the description adds real value beyond them: it discloses the brute-force rotation search semantics, the exact error contract (no protocol errors, {"error": ...} payload with a concrete example), and explicit retry safety after correcting input.

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?

Purpose and scope are front-loaded and each block (algorithm, example, routing, error contract) carries distinct information. It is on the long side for a single tool, and the bare 'FREE.' fragment and duplicated read-only/idempotent statement are the only low-value lines.

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?

With an output schema present, return values needn't be documented, yet the description still shows a sample response shape, and it fully covers the error/failure path and retry behavior — nothing an agent needs in order to call it correctly 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?

Schema coverage is 100% so the baseline is 3, but the worked example ({"item_length": 10, ..., "box_options": [[12,9,4],[14,10,6]]}) concretely binds the parameters to their units and nesting shape, plus 'allowing for padding' clarifies the padding parameter's role in the comparison.

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 precise verb+resource+objective: 'Pick the smallest box an item actually fits in, allowing for padding.' It also names the sibling it is not (dim_weight) so the agent can distinguish them without opening either schema.

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?

'Use when choosing packaging from stock' gives the positive trigger, and 'Not for what the carrier will bill once a box is chosen: that is dim_weight' gives an explicit exclusion plus the alternative to route to.

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.