API & MCP
Everything a person can do on Twinworks Bottleneck Analysis, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://twinworksbottleneckanalysis.usefulweb.site/api/v1/calculate– run Twinworks Bottleneck AnalysisGET https://twinworksbottleneckanalysis.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Twinworks Bottleneck Analysis
Ranks the stations of a Twinworks factory model by how often they constrain the line (active-period method: sole and shifting bottleneck shares), explains the dominant loss (working, breakdowns, setups, waiting for operators) and simulates typical improvements of the top bottleneck — an extra server, a 10 % faster cycle, faster repairs, shorter setups, more operators or a bigger buffer — with paired confidence intervals.
| Field | Type | Default | Description |
|---|---|---|---|
model | textarea | — | Model or project JSON. A Twinworks project (.twinworks.json, format "twinworks-project") or a bare model with "nodes" and "links". Times in seconds, lengths in metres. Leave empty and pick a template instead. |
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 start from a template |
replications | integer | 5 | Replications |
horizonHours | number | — | Run length per replication. Overrides the model setting. |
whatIf | boolean | true | Simulate improvement options for the top bottleneck |
Example request
Bottleneck demo (5 stations, tiny buffers)
curl -X POST https://twinworksbottleneckanalysis.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"template":"bottleneck-buffer-sizing","replications":5,"horizonHours":8}'
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://twinworksbottleneckanalysis.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
twinworks_bottleneck_analysis - Local stdio connector:
node src/mcp-stdio.ts --tool=twinworks-bottleneck-analysis
{
"mcpServers": {
"twinworks-bottleneck-analysis": { "type": "http", "url": "https://twinworksbottleneckanalysis.usefulweb.site/mcp" }
}
}