API & MCP
Everything a person can do on Kerfwise Sheet Nesting Optimizer, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://kerfwisesheetnesting.usefulweb.site/api/v1/calculate– run Kerfwise Sheet Nesting OptimizerGET https://kerfwisesheetnesting.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Kerfwise Sheet Nesting Optimizer
A cutting optimiser for panel saws and CNC routers: list parts (rectangles, L-shapes, corner cuts or quarter rounds) with quantity and grain, choose the sheet size (e.g. 2800 × 2070), saw kerf and trim margin, and get guillotine-cuttable or MaxRects layouts, sheet count, yield per sheet, the lower bound on the sheet count and the gap to it, reusable offcuts, the guillotine cut sequence, SVG drawings and a DXF R12 file. An optional deep search tries many seeded variations and stops as soon as the layout is proven optimal.
| Field | Type | Default | Description |
|---|---|---|---|
parts (required) | table | — | Parts. Length runs along the grain. Tick grain to forbid rotation (on a grained material). |
sheetLength | number | 2800 | Sheet length. Common sizes: 2800 × 2070, 2440 × 1220, 3050 × 1220, 2500 × 1250, 2620 × 2070, 2750 × 1830, 2800 × 2100, 2440 × 1830, 1220 × 610. |
sheetWidth | number | 2070 | Sheet width |
sheetQty | integer | 0 | Sheets available. 0 = unlimited. |
sheetPrice | number | 0 | Price per sheet |
kerf | number | 4 | Saw kerf |
trim | number | 10 | Trim margin per edge |
method | select (auto, guillotine, maxrects) | "auto" | Method |
grainedMaterial | boolean | true | Material has grain |
allowRotation | boolean | true | Allow rotating parts without grain |
minOffcutLength | number | 300 | Min. offcut length to keep |
minOffcutWidth | number | 100 | Min. offcut width to keep |
effort | select (fast, deep) | "fast" | Optimisation |
iterations | integer | 400 | Deep search iterations |
seed | integer | 1 | Search seed. Same seed + same input = same layout. |
Example request
16 panels 600 × 500 on 2800 × 2070 (exactly one sheet)
curl -X POST https://kerfwisesheetnesting.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"parts":[{"name":"Panel","length":600,"width":500,"qty":16}],"sheetLength":2800,"sheetWidth":2070,"kerf":4,"trim":10,"method":"guillotine","grainedMaterial":false}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://kerfwisesheetnesting.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
kerfwise_sheet_nesting - Local stdio connector:
node src/mcp-stdio.ts --tool=kerfwise-sheet-nesting
{
"mcpServers": {
"kerfwise-sheet-nesting": { "type": "http", "url": "https://kerfwisesheetnesting.usefulweb.site/mcp" }
}
}