API & MCP

Everything a person can do on Twinworks Queueing Check, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Twinworks Queueing Check

Closed-form queueing results for a single workstation: utilization, mean waiting time, queue length and time in system for M/M/1, M/M/c (Erlang C), M/D/1, M/G/1 (Pollaczek–Khinchine) and the Kingman G/G/1 approximation. Optionally runs the Twinworks simulation of the same station and reports whether the theory lies inside the simulated confidence interval.

Inputs of Twinworks Queueing Check
FieldTypeDefaultDescription
queueselect (mm1, mmc, md1, mg1, gg1)"mm1"Queue model
arrivalsPerHour (required)number60Arrival rate
serviceTime (required)number48Mean service (cycle) time
serversinteger2Servers (M/M/c)
serviceScvnumber1Service SCV (variance ÷ mean²)
arrivalScvnumber1Inter-arrival SCV (G/G/1)
verifybooleanfalseVerify by simulation. Runs the same station in Twinworks (M/M/1, M/M/c, M/D/1 only).
replicationsinteger10Replications for the check

Example request

M/M/1 at 80 % utilization, verified by simulation

curl -X POST https://twinworksqueueformulas.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"queue":"mm1","arrivalsPerHour":60,"serviceTime":48,"verify":true,"replications":10}'

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)

{
  "mcpServers": {
    "twinworks-queue-formulas": { "type": "http", "url": "https://twinworksqueueformulas.usefulweb.site/mcp" }
  }
}