Skip to main content
Glama
eng-toolkit

eng-toolkit

by Lin830326

Metrology Check Scan

metrology_check_scan

Compare a 3D scan point cloud with its STEP model to measure signed surface deviations, summarize RMS/tolerance statistics, and identify where clustered out-of-tolerance regions occur.

Instructions

Compare a 3D scan (point cloud) with its STEP model and report how far the part is from the model and where. Deviation is the signed distance from each scan point to the model surface, positive outside the material (unsigned if the model is not exactly one closed solid). Returns RMS, mean, standard deviation, maximum, 95th percentile, the fraction of points beyond 'tolerance', a histogram, the worst points, clustered out-of-tolerance regions (centroid, bounding box, worst deviation) and a deviations.csv artifact. registration 'icp' first refines the alignment with point-to-plane ICP (the scan must already be roughly aligned); 'none' trusts the scan frame. Needs the optional scan engines (uv sync --extra scan).

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": {
      "scan_path": "<scan_path>",
      "scan_unit": "<scan_unit>",
      "model_path": "<model_path>",
      "tolerance": "<tolerance>"
    },
    "name": "metrology_check_scan"
  }
}

Input Schema

NameRequiredDescriptionDefault
scan_pathYesPath to the point cloud: .ply .pcd .xyz .xyzn .xyzrgb or .pts
scan_unitYesLength unit of the point-cloud coordinates, which carry none, as a unit only with no number: 'mm', 'm', 'inch', 'um'. '2 mm' is rejected
toleranceYesLargest acceptable distance between a scan point and the model, with unit, e.g. '0.1 mm'
max_pointsNoScans with more points are downsampled to this many (fixed seed), 1000 to 5000000
model_pathYesPath to the STEP model (.step or .stp); read in millimetres
output_unitNoLength unit of the results, e.g. 'mm', 'um', 'inch'mm
registrationNo'none' (default): the scan is already in the model frame. 'icp': refine with ICP firstnone
mesh_deflectionNoLargest chord error allowed when the STEP model is tessellated, with unit, e.g. '0.01 mm'. Deviations smaller than this are not meaningful0.01 mm
icp_max_distanceNoICP only: largest scan-to-model correspondence distance with unit, e.g. '5 mm'5 mm

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.2/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and discloses substantial detail: signed versus unsigned deviation, ICP refinement behavior and its alignment precondition, the optional scan-engine dependency, and the artifact written. It does not explicitly discuss whether the artifact creation is a side effect or describe error/failure conditions, so it falls short of the richest possible disclosure.

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 the core comparison and remains dense without filler. It is a single long paragraph, and its enumeration of return statistics partly duplicates the existing output schema, so it is not maximally disciplined. Still, every clause contributes context and nothing is obviously wasteful.

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?

Given nine parameters, no annotations, and an output schema, the description is complete for invoking the tool correctly. It covers the scan-to-model comparison, registration modes, signed-distance caveat, engine dependency, and tolerance-based reporting. Return-value detail is not strictly necessary because an output schema exists, but its inclusion does not leave gaps.

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 coverage is already 100%, so the baseline is 3, but the description adds meaning beyond the schema: it explains the signed-distance interpretation, the rough-alignment precondition for ICP, and that deviations below mesh_deflection are not meaningful. These additions help an agent understand parameter consequences rather than merely their formats.

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: compare a 3D scan point cloud with its STEP model and report deviation magnitude and location. It clearly defines the core operation, including signed-distance behavior and the condition under which the sign is unavailable. This is far more specific than the tool name alone and lets an agent identify the operation precisely.

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 gives useful conditional guidance for the registration parameter, including that 'icp' requires the scan to already be roughly aligned and 'none' trusts the scan frame. However, it does not explicitly say when to choose this tool over related siblings such as metrology_form_error or position_tolerance. Usage is therefore implied rather than fully routed.

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