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

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

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 establish that the tool is read-only, idempotent, non-destructive, and closed-world, but the description adds substantial behavioral detail beyond that: cost versus count optimization, CP-SAT optimality or FEASIBLE fallback, time-limit behavior, and the fact that invalid input returns an error object rather than a protocol error. It also explains that retrying after correction is safe.

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 description is front-loaded with purpose, example, and usage boundary, and most sentences earn their place by conveying solver behavior, error handling, or sibling routing. It is information-dense but slightly overpacked, and the standalone 'FREE.' token adds little 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?

Given the optimization complexity, the presence of an output schema, and the rich annotations, the description is complete: it covers objective, solver status, input limits, error format, retry safety, and the relevant sibling alternative. An agent has enough information to select and invoke it correctly.

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 description coverage is already 100%, so the baseline is 3, but the description adds useful semantic context through a concrete example showing how stock, parts, and kerf are structured together. It also clarifies that stock cost drives the objective and that stock count is used when cost is absent, though it does not explicitly explain time_limit_s in prose beyond the solver time-limit concept.

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 clearly states a specific optimization resource: a least-waste 1D cut plan for bars, pipes, or boards, including saw kerf. It also explicitly distinguishes the tool from the sheet-cutting sibling by saying it is not for sheets and naming cutting_stock_2d.

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?

It gives a concrete usage boundary (cut lists up to 200 pieces) and explicitly routes sheet-cutting use cases to cutting_stock_2d. That is both an inclusion condition and an alternative-tool exclusion.

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.