One-dimensional tolerance stack-up (worst-case and RSS)
Computes the minimum and maximum of a linear dimensional stack (the gap) from signed contributions with symmetric, unequal-bilateral, unilateral or min/max limits, both by exact worst-case arithmetic and by root-sum-square, names the dominant contributor and tests the gap against a required minimum and/or maximum. For mechanical designers and agents checking clearances. It does not do 2D or 3D stacks, GD&T material-condition bonus or datum shift, thermal growth or distribution fitting. The RSS result assumes independent, centred, normal dimensions and is labelled as an assumption.
What you get
Exact worst-case stack-up with margin and dominant contributor in one $0.005 call.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/tolerance-stack. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/tolerance-stack \
-H 'content-type: application/json' \
-d '{"unit":"mm","dimensions":[{"name":"housing bore","nominal":50,"plus":0.1,"minus":0},{"name":"bearing A","nominal":20,"tol":0.05,"sign":-1},{"name":"spacer","nominal":29.5,"tol":0.1,"sign":-1}],"requirement":{"min":0.1}}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
unit | string; length 0..16 | no | Label for the single unit all numbers share (not converted). |
dimensions | array<object>; max 100 items | yes | At most 100. Give nominal with tol, or nominal with plus and/or minus (unilateral: one of them), or min and max. |
requirement | object | no | Allowed gap range. |
method | string; one of "worst-case", "rss" | no | Which result decides status against the requirement (default worst-case). Both are always reported. |
sigmaLevel | number; 0.5..10 | no | RSS: each tolerance is this many sigma (default 3). |
reportSigma | number; 0.5..10 | no | RSS: report the gap at this many sigma (default equals sigmaLevel). |
Example request body
{
"unit": "mm",
"dimensions": [
{
"name": "housing bore",
"nominal": 50,
"plus": 0.1,
"minus": 0
},
{
"name": "bearing A",
"nominal": 20,
"tol": 0.05,
"sign": -1
},
{
"name": "spacer",
"nominal": 29.5,
"tol": 0.1,
"sign": -1
}
],
"requirement": {
"min": 0.1
}
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
unit | string | no | |
nominalGap | number | no | |
worstCase | object | no | |
rss | object | no | |
method | string | no | |
margin | one of | no | |
contributors | array<object> | no | |
dominant | one of | no | |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the physical-ops-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent