API & MCP
Everything a person can do on Box Dieline Generator (tuck box, pillow box, gift box), a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://kerfwiseboxdieline.usefulweb.app/api/v1/calculate– run Box Dieline Generator (tuck box, pillow box, gift box)GET https://kerfwiseboxdieline.usefulweb.app/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Box Dieline Generator (tuck box, pillow box, gift box)
Make a folding box template at your exact size: reverse tuck-end box, pillow box, two-piece gift box (base and lid), pyramid or sleeve. Cut lines and fold lines sit on separate layers (or fold lines become perforations), the board thickness is added at the folds, and you get layered SVG and DXF for cutting machines plus a 1:1 PDF with a scale bar, tiled onto A4/Letter when the net is larger.
| Field | Type | Default | Description |
|---|---|---|---|
style | select (tuck-end, pillow, gift, pyramid, sleeve) | "tuck-end" | Box style |
length | number | 70 | Inside length — front width (mm) |
width | number | 40 | Inside width — depth (mm) |
height | number | 100 | Inside height (mm). Pyramid: apex height. Sleeve: length of the sleeve. |
caliper | number | 0.4 | Board thickness (mm). Paper 0.1–0.2, card 0.3–0.5, chipboard 1–2 mm. |
glue | number | 12 | Glue flap width (mm) |
extra | number | 0 | Lid height (gift box) or curve depth (pillow box), mm, 0 = automatic |
notch | boolean | true | Finger notch (tuck-end box, sleeve) |
sheetWidth | number | 0 | Sheet or laser bed width (mm, 0 = no sheet). With a sheet size the parts are nested onto as many sheets as needed; 0 lays every part out in one drawing. |
sheetHeight | number | 0 | Sheet or laser bed height (mm, 0 = no sheet) |
spacing | number | 4 | Gap between parts (mm). For CNC routing use at least the cutter diameter. |
labels | boolean | true | Part names on a separate label layer |
foldStyle | select (score, perforated) | "score" | Fold lines |
paper | select (fit, a3, a4, a5, a6, b5, letter, legal, tabloid, halfletter) | "fit" | PDF pages |
Example request
Reverse tuck-end box for a 63 × 88 mm card deck
curl -X POST https://kerfwiseboxdieline.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"style":"tuck-end","length":66,"width":22,"height":92,"caliper":0.35}'
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://kerfwiseboxdieline.usefulweb.app/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
kerfwise_box_dieline - Local stdio connector:
node src/mcp-stdio.ts --tool=kerfwise-box-dieline
{
"mcpServers": {
"kerfwise-box-dieline": { "type": "http", "url": "https://kerfwiseboxdieline.usefulweb.app/mcp" }
}
}