Skip to main content
Glama

Moltline Optimize

Cutting Stock 1D

cutting_stock_1d
Read-onlyIdempotent

Least-waste cut plan for bars, pipes or boards from stock lengths, with saw kerf. FREE.

Typical input {"stock": [{"length": 6000, "cost": 30}], "parts": [{"length": 2200, "qty": 3}, {"length": 1500, "qty": 4}], "kerf": 3} returns {"bars": [{"stock_length": 6000, "cuts": [2200, 2200, 1500], "waste": 94}], "bars_used": 3, "waste_pct": 4.2, "solver_status": "OPTIMAL"}. Minimises total stock cost (or count when no cost); CP-SAT proves optimality when it finishes inside the time limit and otherwise returns the best plan found as FEASIBLE. Use for a cut list of up to 200 pieces. Not for sheets: use cutting_stock_2d. Errors: on invalid, missing, or malformed input this tool never raises a protocol error — it returns {"error": ""} (for example {"error": "stock and parts must be non-empty lists ( and )"}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kerfNomaterial lost per cut (same unit as lengths).
partsYesrequired pieces: {length, qty}.
stockYesstock lengths available: {length, cost, qty} (qty = how many of that length may be used; default unlimited).
time_limit_sNosolver time budget in seconds (default 3, max 15).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Discloses optimization objective (minimises cost/count), solver behavior (proves optimality or returns FEASIBLE plan), and error behavior (never raises protocol error, returns error object). This goes well beyond the readOnly and idempotent annotations.

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?

One dense paragraph with no filler: example input/output, solver behavior, size limit, alternative tool, error handling, and safety. Every sentence adds value.

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 4-parameter tool with no nested objects and an output schema, the description covers input format, return shape, optimization semantics, error behavior, and retry safety. Nothing essential for correct invocation 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 covers 100% of parameters with useful descriptions, so the baseline is high. The description adds a concrete input example clarifying stock/parts/kerf structure and explains cost/count semantics, though time_limit_s is left entirely to 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?

Description opens with 'Least-waste cut plan for bars, pipes or boards from stock lengths', clearly stating what the tool produces. It also distinguishes itself from cutting_stock_2d, making the purpose unmistakable.

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?

Gives explicit guidance: 'Use for a cut list of up to 200 pieces' and 'Not for sheets: use cutting_stock_2d.' This provides both an inclusion criterion and a named alternative, so an agent can route correctly.

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.

TDQS

A4.5/5.0
Disambiguation5/5

Each solver targets a distinct optimization domain (cutting, packing, routing, knapsack, rostering), and scale variants like pack_bins/pack_bins_large and route_plan/route_plan_fleet are explicitly differentiated by size/scope. Helper and meta tools (distance_matrix_haversine, validate_problem, explain_solution) are clearly separate from solve tools.

Naming Consistency4/5

Names are uniformly lowercase snake_case and organized into recognizable families such as cutting_stock_1d/2d, pack_bins/pack_bins_large, and route_plan/route_plan_fleet. The pattern is not strictly verb_object throughout—knapsack_select and distance_matrix_haversine are noun-first or descriptive—so there is minor inconsistency.

Tool Count5/5

With 11 tools, the server is well-scoped for an optimization toolkit: one core solver per problem type, a large-scale packer variant, a distance-matrix helper, and validation/explanation tools. Each tool has a clear role, and the count supports broad coverage without becoming bloated.

Completeness4/5

The server covers a complete solve-validate-explain workflow across major OR problem types—cutting, packing, routing, knapsack, and rostering. Minor gaps exist, such as pack_bins_large not being listed as recognized by explain_solution, and some features are explicitly documented exclusions rather than missing functionality.

Resources