Skip to main content
Glama

Tolerance Stackup

tolerance_stackup
Read-only

Calculate dimensional tolerance stackups from a dimension chain or CAD model. Supports worst-case, RSS, and Monte Carlo analysis to assess assembly variation and spec conformance.

Instructions

Stack a dimension chain. Each chain entry is {name, nominal, plus, minus} with plus/minus the signed upper/lower deviations (plus>=minus; symmetric shorthand {nominal, tol}); add direction:-1 for a subtractive/gap link. method: worstcase | rss | montecarlo (each adds a deeper block). Half-bands are read as 3-sigma; cpk/pct_in_spec use spec_min/spec_max if given, else the worst-case bounds. Returns {nominal, worstcase:{min,max,spread}, rss:{sigma,min_3s,max_3s}, montecarlo:{mean,std,cpk,pct_in_spec,spec}}.

Instead of a hand-built chain, pass a live handle (+ axis, '+z'/'-x'/… or [x,y,z]) and the chain is derived off the solid: planar step faces perpendicular to the axis become consecutive station-to-station links (the stack a height gauge reads off a stepped part). Per-link tolerance: default_tol (± mm), else the ISO 2768-1 general class ('f'|'m'|'c'|'v', default 'm' — the drawing-note default for untoleranced dimensions). The result then echoes the derived chain (+ axis, n_step_faces).

seed fixes the montecarlo draw (12345 default) so the same chain returns the same cpk/pct_in_spec run to run — that determinism is a contract, so change it only to check a result is not an artefact of one draw.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
axisNo+z
seedNo
chainNo
handleNo
methodNoworstcase
generalNom
samplesNo
spec_maxNo
spec_minNo
default_tolNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnlyHint=true, and the description adds meaningful behavioral context: the deterministic seed contract, the 3-sigma interpretation of half-bands, the derivation of chain from planar step faces, and the return structure. It doesn't contradict annotations. It could mention side effects or performance, but for a read-only analysis tool this is solid.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but well-organized: chain mode first, then handle mode, then seed contract. Every sentence adds information. It's longer than ideal but the complexity of the tool (10 params, two modes, three methods) justifies the length. The return structure is compactly listed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter tool with no output schema, the description covers the return object, the two input modes, the method options, the tolerance interpretation, and the determinism contract. It doesn't explicitly define samples or explain the montecarlo block in depth, but the overall picture is complete enough for an agent to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden. It explains chain entry structure ({name, nominal, plus, minus}), direction:-1, method values, general class values, seed determinism, and spec_min/spec_max fallback. It doesn't explicitly explain samples or default_tol in full detail, but default_tol is mentioned and samples is inferable. This is strong compensation for zero schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('Stack a dimension chain') and immediately distinguishes the two input modes (hand-built chain vs. live handle). It clearly differentiates from siblings like tolerance_cost_check and cnc_machinability_check by focusing on stackup analysis. The scope is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly explains when to use a hand-built chain versus a live handle, and how the handle mode derives the chain from a solid. It also explains when spec_min/spec_max are used versus worst-case bounds, and when to change the seed. This is strong usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools