← All engines

RUST ENGINE / optimize_packing

2D sheet cutting and 3D physical bin packing

Pack 3D boxes into containers with rotations, fragility, underside gravity support and weight balance, or cut 2D sheets with blade kerf and straight guillotine cuts in exact integer millimetres.

In short. optimize_packing is a ScoreCompute MCP tool computed in Rust (2D/3D packing). Provide spec (5 to 16,384 characters): mode 3d or mode 2d, unit mm or cm, container bin WxDxH [@weight] [support=PCT] [max_bins=N] or sheet WxH [kerf=MM] [guillotine], and up to 64 item lines (name: dims [*qty] [@weight] [!fragile] [!upright] [!norot], at most 200 total instances and 32 bins). Bounded heuristic search over exact integer coordinates: bin-count optimality is established only when bins_used equals the continuous lower bound. It is callable at https://scorecompute.com/mcp over MCP Streamable HTTP, without an API key for bounded public access.

Open the optimize_packing demonstration ↗Try the live calculation ↗Connect an AI assistant →

What does a real call return?

For 20 boxes in a 120×80×100 cm container (500 kg weight cap, 70% minimum underside support, fragile upright crates), Rust returned packed_all in 1 bin (continuous lower bound 1, matched), placing 20 items at 54.45% volume utilization (45.55% waste), total weight 74.5 kg and Centre of Gravity offset 5.87%. The separate zero-trust geometric verifier reported verified_physically: true after 29,946 placement checks.

Recorded on 26 November 2026 through the public MCP endpoint, service release 0.20.0. Inputs and full responses, response SHA-256 4dbd061201a6…. Verdict values are the literal values the tool returns. Run the same inputs yourself to compare; elapsed times vary, and a new release may change the figures.

Checked against

Recorded on release 0.22.0. These checks cover the listed cases, not every input. Evidence cards.

How it works

The specification is parsed into integer millimetre dimensions and integer gram weights. In 3D mode, a deterministic portfolio of Crainic–Perboli–Tadei Extreme Points constructors (multiple item orderings and contact/layer scorers) plus bounded swap local search places boxes while computing exact coordinate-compressed sweep-line union underside support area and enforcing !fragile, !upright, !norot and max-weight constraints. In 2D mode, a Guillotine split-tree solver (emitting explicit straight through-cuts) or a Maximal Rectangles solver enforces exact blade kerf clearance and !norot grain lock. Every returned layout is checked again by a separate zero-trust geometric and physical verifier before returning.

Inputs and units

Provide spec (5 to 16,384 characters): mode 3d or mode 2d, unit mm or cm, container bin WxDxH [@weight] [support=PCT] [max_bins=N] or sheet WxH [kerf=MM] [guillotine], and up to 64 item lines (name: dims [*qty] [@weight] [!fragile] [!upright] [!norot], at most 200 total instances and 32 bins). Optional detail selects summary or full.

What the result contains

status (packed_all, partial_capacity, infeasible_items), bins_used, bin_count_lower_bound, bin_count_matches_lower_bound, overall utilization and waste percentages, per-bin placements with exact millimetre coordinates, orientations, weight and centre-of-gravity offset, 2D guillotine cut lines, unplaced items with reasons, work_report with verified_physically, canonical SHA-256 digest and explicit limitations.

Example MCP call

{
  "name": "optimize_packing",
  "arguments": {
    "spec": "mode 3d; unit cm; bin 120x80x100 @500kg support=70; A: 40x30x20 *3 @5kg; B: 50x40x30 *2 @8kg !fragile !upright; C: 25x25x25 *6 @2kg; D: 60x40x20 *4 @6kg; E: 30x20x15 *5 @1.5kg;"
  }
}

Send this tool name and arguments through a connected MCP client. Discover the authoritative input schema with tools/list.

Call this engine in one command

Node.js 20+ and npm. This downloads a small remote MCP client; it does not install the engine locally.

npx --yes --package https://scorecompute.com/downloads/scorecompute-call-0.14.2.tgz scorecompute-call optimize_packing --arguments '{"spec":"mode 3d; unit cm; bin 120x80x100 @500kg support=70; A: 40x30x20 *3 @5kg; B: 50x40x30 *2 @8kg !fragile !upright; C: 25x25x25 *6 @2kg; D: 60x40x20 *4 @6kg; E: 30x20x15 *5 @1.5kg;"}'

Client download, PowerShell input and verification →

Direct MCP access

optimize_packing is independently callable. It is deliberately not connected to the automatic planner, so nothing passes its results to another engine for you. Two tools returning similar JSON fields does not mean their results are compatible.

Cite this engine

Version 0.1.0, source SHA-256 de64256cb2ca…. Evidence recorded on release 0.22.0; the public service currently runs 0.22.0. Replace the access date when you cite it.

ScoreCompute. 2D sheet cutting and 3D physical bin packing (optimize_packing), version 0.1.0, source SHA-256 de64256cb2ca52ec7e0b351f65bbc5866bcfb8c952da914788f8cc6f4c8233db. Evidence release 0.22.0, service release 0.22.0. https://scorecompute.com/engines/optimize-packing/ (accessed YYYY-MM-DD).

All engine citations · Evidence card

Execution and availability

ScoreCompute exposes this tool through MCP Streamable HTTP. Rust computation runs on a connected worker; the public website and MCP gateway run separately. Among these 28 scientific tools, CUDA is implemented for simulate_pi; the other scientific engines run on CPU. The separate contributor network runs two compiled public workloads: a π estimate and fixed synthetic schedule probes. Requests are bounded and concurrent work may be refused when capacity is occupied.

Record inputs, assumptions and returned provenance when sharing a result. The public observatory displays software client names and tool activity, without publishing calculation arguments or results.

Explore another engine →Agent-readable overview ↗

Related guide

2D cutting stock & 3D container packing: kerf, guillotine cuts, fragility and gravity support →

Sources

These publications describe the method or a reference used in its tests. Citing them does not certify this implementation.

First published 26 November 2026 · Last updated 26 November 2026