Skip to main content
Glama
eng-toolkit

eng-toolkit

by Lin830326

Geometry Check Dfm

geometry_check_dfm

Runs design-for-manufacturing checks on solid 3D CAD files for CNC milling or sheet metal, returning rule-based findings with severity, measured values, and limits.

Instructions

Design-for-manufacturing checks of a solid 3D CAD file (.step .stp .iges .igs .brep, millimetres) for one process: 'cnc_milling' (internal corner radius against the tool radius, thinnest wall, hole depth/diameter ratio, smallest hole, planar faces no axis direction reaches) or 'sheet_metal' (uniform thickness, bend radius against thickness, hole-to-edge distance). Other processes (turning, injection_molding, additive, ...) are not supported and are refused, not guessed. Each finding has a rule id, severity (error, warn, info), the measured value and the limit, face and edge ids, a point in model coordinates and whether the check is 'exact' or 'heuristic'; the result also counts findings by severity and lists the checks that were NOT performed. 'limits' is an optional JSON object that overrides the defaults, e.g. {"min_wall": "1 mm", "tool_radius": "1.5 mm"} for cnc_milling, where tool_radius is the end mill RADIUS, half its diameter (a 3 mm end mill is '1.5 mm') (keys: min_wall, tool_radius, max_hole_depth_ratio, min_hole_diameter, min_access_directions, near_tangent_deg), or {"min_bend_radius_ratio": 1.5} for sheet_metal (keys: max_thickness, min_bend_radius_ratio, min_hole_edge_ratio, near_tangent_deg). The defaults are the toolkit's own rules of thumb, not a standard; a bad limit is refused at its own key (details.param '/limits/'). A file that is not made of closed solids only (a shell, a solid whose shell is open, loose faces beside a solid) is refused (geometry.not_a_solid). max_seconds is a wall-clock budget (default 120, 1 to 600 seconds). On expiry, returns geometry.time_budget_exceeded at the next check. An OpenCASCADE call already running cannot be interrupted. Needs the optional cad engine (uv sync --extra cad).

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": {
      "model_path": "<model_path>"
    },
    "name": "geometry_check_dfm"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitsNoOptional JSON object of limits overriding the defaults, lengths as strings with a unit: {"min_wall": "1 mm", "tool_radius": "1.5 mm", "max_hole_depth_ratio": 8}. tool_radius is the end mill RADIUS, not its diameter: a 3 mm end mill is "1.5 mm". near_tangent_deg (default 5, degrees) is the smallest turn between two faces read as a corner. Unknown keys are refused. Empty = defaults
processNo'cnc_milling' or 'sheet_metal'; anything else is refusedcnc_milling
tool_axisNocnc_milling: spindle axis, one of +x -x +y -y +z -z; give the shop's setup. Empty = +z, with a warning
model_pathYesPath to the model: .step .stp .iges .igs or .brep
max_secondsNoWall-clock budget in seconds, 1 to 600; default 120. Stops at the next check; a running OpenCASCADE call cannot be interrupted
output_unitNoLength unit of the measured values and limits, e.g. 'mm', 'inch'mm
max_findingsNoFindings listed in data, 1 to 500. The summary counts and dfm_findings.json cover all of them

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
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so thoroughly: it discloses refusals (shells or open solids → geometry.not_a_solid), time-budget behaviour (geometry.time_budget_exceeded at the next check, an in-flight OpenCASCADE call cannot be interrupted), validation failures routed to details.param '/limits/<key>', and the dependency on the optional cad engine. It also notes the defaults are toolkit rules of thumb, not a standard, which is exactly the kind of caveat an agent needs.

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

Conciseness3/5

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

Front-loaded and information-dense, but delivered as one very long paragraph mixing purpose, supported processes, output shape, limits keys, refusal modes and timing. The detailed limits key list is repeated from the schema and would be better placed there, and the length slows scanning for an agent deciding whether to call.

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?

For a complex 7-parameter analysis tool with real refusal and timing failure modes, nothing essential is missing: inputs, per-process rules, output finding fields, severity counts, skipped-check reporting, and error conditions are all covered. The output schema exists, yet the prose summary of return fields still helps interpretation without becoming redundant bloat.

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 100%, so the baseline is 3, but the description adds real meaning beyond it: it groups the limits keys per process (cnc_milling vs sheet_metal key sets), clarifies that tool_radius is the end-mill radius (a 3 mm mill is '1.5 mm'), and explains how bad limits are rejected. The enumeration of keys duplicates the schema somewhat, but the per-process split and default caveat are not in 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?

States a specific verb and resource ('Design-for-manufacturing checks of a solid 3D CAD file') and names the exact scope: the two supported processes 'cnc_milling' and 'sheet_metal', with the file formats and unit. An agent can immediately tell this is a DFM rule check, not a measurement or conversion call like the geometry_* 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?

Gives strong selection guidance at the process level: turning, injection_molding and additive 'are not supported and are refused, not guessed', and it warns that tool_axis should reflect the shop's setup. It does not, however, contrast with sibling tools such as geometry_measure or digital_check, so the agent must infer that boundary itself.

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