API & MCP
Everything a person can do on Twinworks Line Capacity Calculator, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://twinworkslinecapacity.usefulweb.app/api/v1/calculate– run Twinworks Line Capacity CalculatorGET https://twinworkslinecapacity.usefulweb.app/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Twinworks Line Capacity Calculator
Analytic capacity of a serial production line: takt time from demand and available time, theoretical and effective capacity of every station with parallel machines and batch sizes, OEE = availability × performance × quality with downstream scrap, the bottleneck with and without losses, load at demand, Little’s law lead time for your work in process and the Factory Physics best-case, practical-worst-case and worst-case benchmarks. Enter stations or read them from a Twinworks model.
| Field | Type | Default | Description |
|---|---|---|---|
stations | table | — | Stations in flow order. Cycle time per unit and machine (for a batch station: per batch). Availability, performance and quality in percent (empty = 100 %). |
template | select (, three-station-line, line-with-failures, assembly-two-feeders, job-shop-routings, bottleneck-buffer-sizing, conveyor-packaging, mm1-validation, shared-forklifts, plc-control) | — | Or read the stations from a template |
model | textarea | — | Or a Twinworks model JSON. A .twinworks.json project or model; the serial line from its source to its sink is read (mean cycle times, servers, MTBF/MTTR availability, ideal cycle time, scrap). |
availableMinutes | number | 450 | Available time per period. Net production time, e.g. a 8 h shift minus 30 min breaks = 450 min. |
demand | number | — | Demand per period. Optional: gives the takt time and the load at demand. |
wip | number | — | Work in process. Optional: units in the line for Little’s law (lead time = WIP ÷ throughput). |
Example request
Three stations, one with two parallel machines, OEE losses, 400 units per 450-minute shift
curl -X POST https://twinworkslinecapacity.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"stations":[{"name":"Saw","cycle":40,"availability":95,"performance":95,"quality":99},{"name":"Mill","cycle":96,"parallel":2,"availability":85,"performance":90,"quality":98},{"name":"Deburr","cycle":38,"availability":98,"performance":95,"quality":100}],"availableMinutes":450,"demand":400,"wip":20}'
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://twinworkslinecapacity.usefulweb.app/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
twinworks_line_capacity - Local stdio connector:
node src/mcp-stdio.ts --tool=twinworks-line-capacity
{
"mcpServers": {
"twinworks-line-capacity": { "type": "http", "url": "https://twinworkslinecapacity.usefulweb.app/mcp" }
}
}