Skip to main content
Glama
eng-toolkit

eng-toolkit

by Lin830326

Metrology Stackup 1D

metrology_stackup_1d

Computes one-dimensional tolerance stack-ups for dimension chains and returns closing dimension limits, per-link contributions, and optional Monte Carlo risk using worst-case or RSS methods.

Instructions

One-dimensional tolerance stack-up of a dimension chain. 'chain' is a JSON array of links {"name","nominal","tol" or ("plus","minus"),"direction":"+"|"-"}; direction "+" adds to the closing dimension, "-" subtracts. method "worst_case" (default) or "rss". Returns the nominal, mean and limits of the closing dimension and each link's share. A link may instead be an ISO 286 fit {"name","fit":"H7/g6","nominal":,"direction"}: its nominal is the diameter (3 to 500 mm) and the link itself is the clearance. Optional seeded Monte Carlo returns the probability of falling outside lower_limit/upper_limit.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "chain": "<chain>"
    },
    "name": "metrology_stackup_1d"
  }
}

Input Schema

NameRequiredDescriptionDefault
seedNoMonte Carlo random seed; the same seed gives the same result
chainYesJSON array of links, e.g. [{"name":"housing","nominal":"50 mm","tol":"0.1 mm","direction":"+"},{"name":"bearing","nominal":"20 mm","plus":"0 mm","minus":"0.12 mm","direction":"-"}]. Every length needs a unit, also '0 mm'. 'tol' is symmetric +/-; 'plus'/'minus' are magnitudes. A fit link {"fit":"H7/g6","nominal":"25 mm","direction":"-"} replaces the tolerance: 'nominal' is then the diameter and the link itself is the clearance (hole - shaft).
methodNo'worst_case' (default) or 'rss'worst_case
samplesNoMonte Carlo sample count, 1000 to 2000000
lower_limitNoLower spec limit of the closing dimension with unit, e.g. '0.2 mm'. Empty = none
monte_carloNoAlso run a seeded Monte Carlo simulation
output_unitNoLength unit of the results, e.g. 'mm', 'um', 'inch'mm
upper_limitNoUpper spec limit of the closing dimension with unit, e.g. '0.8 mm'. Empty = none
distributionNoMonte Carlo link distribution: 'normal' (tolerance = +/-3 sigma, default) or 'uniform'normal

Output Schema

NameRequiredDescriptionDefault
okYes
dataNoNon-quantity payload (reports, listings)
errorNo
valueNoPrimary quantity result
valuesNoAll named quantity results (includes the primary)
warningsNo
artifactsNo
provenanceYesWhat produced the result and from which inputs.
review_statusNounreviewed

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the disclosure burden and does well: it states the return contents, that results are unit-converted via output_unit, that the Monte Carlo is seeded and reproducible, and that fit links are constrained to diameters of 3–500 mm. It does not state that the tool is a pure stateless computation (no side effects) or how invalid input such as mismatched units is reported, which keeps it short of a 5.

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?

Front-loaded with purpose, then structured in a logical order: chain structure, direction rules, method, return values, fit links, Monte Carlo. It is a dense block of prose rather than being broken out, but every sentence carries specification detail and nothing is padding.

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 9-parameter computation tool with an output schema, the description covers the chain format, both methods, the fit variant, unit requirements and the optional simulation, so an agent can construct a valid call. The remaining gaps are error behavior and what happens when Monte Carlo is enabled without spec limits, which are secondary.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents every one of the nine parameters, which sets the baseline at 3. The description genuinely adds the meaning of direction '+'/'-' relative to the closing dimension and the fact that a fit link's nominal is the diameter while the link itself is the clearance, but most other parameter text restates the schema.

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?

Opens with a precise verb+resource: 'One-dimensional tolerance stack-up of a dimension chain.' The scope (a chain of links with direction signs, closing dimension) is specific enough to separate it from single-fit tools like metrology_fit_limits and from the other metrology siblings, and it states what the output is (nominal, mean, limits, per-link share).

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

Usage Guidelines3/5

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

The description explains internal option choices well ('method worst_case (default) or rss', when the optional seeded Monte Carlo applies) but never states when an agent should pick this tool over a sibling such as metrology_fit_limits for a single fit. Usage is implied by the domain vocabulary rather than declared.

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