Skip to main content
Glama
eng-toolkit

eng-toolkit

by Lin830326

Metrology Position Tolerance

metrology_position_tolerance

Calculate true position (ISO 1101) from nominal and measured coordinates, including MMC/LMC bonus, and determine pass/fail against the stated tolerance.

Instructions

True position (ISO 1101) of features from their nominal and measured coordinates. For each feature the deviation is measured minus nominal and the position error is the diameter of the zone it needs, 2sqrt(dx^2+dy^2) for x,y (spherical SØ 2sqrt(dx^2+dy^2+dz^2) for x,y,z). It passes when that does not exceed the tolerance plus the bonus. With bonus_modifier 'M' (maximum material condition) or 'L' (least material condition) the bonus is how far the actual feature size has left its MMC / LMC size (for a hole MMC is the smallest hole, for a shaft the largest). Datum shift is not applied; coordinates must already be in the datum reference frame of the nominal.

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": {
      "nominal": "<nominal>",
      "measured": "<measured>",
      "tolerance": "<tolerance>"
    },
    "name": "metrology_position_tolerance"
  }
}

Input Schema

NameRequiredDescriptionDefault
unitNoLength unit of the numbers in nominal, measured and feature_size, as a unit only with no number: 'mm', 'um', 'inch'mm
nominalYesNominal feature coordinates, one feature per row: JSON [[x,y],...] or text '10,20; 30,40' (rows by line or ';'). x,y or x,y,z, in 'unit'
lmc_sizeNoLeast material size with unit, e.g. '10.1 mm'. Required with bonus_modifier 'L'
measuredYesMeasured feature coordinates, same layout, row count and column count as 'nominal'
mmc_sizeNoMaximum material size with unit, e.g. '10 mm'. Required with bonus_modifier 'M'
toleranceYesStated position tolerance, the diameter of the zone, with unit, e.g. '0.1 mm' ('0 mm' is allowed)
output_unitNoLength unit of the results, e.g. 'mm', 'um', 'inch'mm
feature_kindNo'hole' (internal feature: slot, hole; MMC is its smallest size) or 'shaft' (external feature: pin, boss; MMC is its largest size). Only used with a bonus modifierhole
feature_sizeNoActual size of each feature (measured diameter or width) in 'unit', one number per feature in the order of nominal: JSON [10.02, 10.05] or '10.02; 10.05'. Required with a bonus modifier
bonus_modifierNo'none' (default, no bonus), 'M' (MMC bonus) or 'L' (LMC bonus)none

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

A4.5/5.0
Behavior4/5

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

With no annotations, the description itself discloses the measured-minus-nominal deviation, diametral and spherical zone calculations, the tolerance-plus-bonus pass criterion, M/L bonus behavior, and the absence of datum shift. It does not explicitly address side effects or validation and error behavior, though those are secondary concerns for this self-contained calculation.

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 front-loaded with purpose and then proceeds logically through error calculation, acceptance, bonus tolerance, and the datum-shift limitation, with no filler. Its dense parenthetical clauses and formulas in one paragraph reduce scannability slightly.

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

Completeness5/5

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

Combined with the comprehensive input schema and existing output schema, the description supplies the information needed to invoke this complex calculator correctly: supported coordinate dimensions, pass/fail semantics, modifier behavior, feature-kind considerations, and the datum-frame prerequisite. The lack of alternative-workflow routing or malformed-input details does not leave a material invocation gap.

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

Parameters5/5

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

Beyond the fully documented schema, it explains how nominal, measured, and tolerance participate in the calculation and how actual feature size, MMC/LMC size, and hole-versus-shaft behavior affect bonus tolerance. It also adds the important coordinate-frame requirement for nominal and measured; unit syntax remains adequately covered by 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?

The opening sentence identifies the exact calculation: ISO 1101 true position for features from nominal and measured coordinates. The subsequent 2D and 3D formulas further define its scope and distinguish it from fit, form-error, scan-checking, and stack-up siblings.

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

Usage Guidelines4/5

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

It provides a clear use case and an explicit precondition: datum shift is not applied, so coordinates must already be in the nominal's datum reference frame. It does not direct the agent to an alternative when datum shift or another GD&T evaluation is required, but the principal when-not case is clear.

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