One-dimensional tolerance stack-up (worst-case and RSS)

$0.005 USDC per call · Business, finance and compliance · POST /api/v1/tolerance-stack · Id tolerance-stack

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

FieldTypeRequiredDescription
unitstring; length 0..16noLabel for the single unit all numbers share (not converted).
dimensionsarray<object>; max 100 itemsyesAt most 100. Give nominal with tol, or nominal with plus and/or minus (unilateral: one of them), or min and max.
requirementobjectnoAllowed gap range.
methodstring; one of "worst-case", "rss"noWhich result decides status against the requirement (default worst-case). Both are always reported.
sigmaLevelnumber; 0.5..10noRSS: each tolerance is this many sigma (default 3).
reportSigmanumber; 0.5..10noRSS: 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.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: 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.
unitstringno
nominalGapnumberno
worstCaseobjectno
rssobjectno
methodstringno
marginone ofno
contributorsarray<object>no
dominantone ofno
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways 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