Skip to main content
Glama
eng-toolkit

eng-toolkit

by Lin830326

Fem Mesh

fem_mesh

Generates a second-order tetrahedral finite element mesh from one STEP/IGES/BREP solid at a specified element size, returning quality statistics, volume comparison, warnings, and an .msh artifact.

Instructions

Tetrahedral finite element mesh (second-order, 10-node) of one solid in a CAD file (.step .stp .iges .igs .brep, read in millimetres, same loader as geometry_measure), made with Gmsh. Give the target element size with a unit, e.g. '5 mm'. Returns node and element counts, element quality statistics (mean ratio: 1 regular, 0 flat), the meshed volume against the exact B-rep volume, and warnings for slivers and coarse meshes; the mesh is an artifact (.msh, ASCII format 2). The work is capped before meshing: elements are estimated as 4volume/size^3 + 1.7area/size^2 (fitted to real Gmsh counts, within about 1.25x) and a size that needs more than 60000 elements, or is below 1/1000 of the part's diagonal, is refused as input.too_large. One solid only. The caller never supplies a Gmsh script. Needs the optional cad engine (uv sync --extra cad) and Gmsh installed by you (set ENG_TOOLKIT_GMSH or put gmsh on PATH; run toolkit_doctor to see).

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>",
      "element_size": "<element_size>"
    },
    "name": "fem_mesh"
  }
}

Input Schema

NameRequiredDescriptionDefault
model_pathYesPath to a solid model: .step .stp .iges .igs or .brep
output_unitNoLength unit of the volumes in the result, e.g. 'mm' (default), 'm', 'inch'mm
element_sizeYesTarget element edge length with unit, e.g. '5 mm' or '0.2 inch'

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.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the returned diagnostics (counts, mean-ratio quality, meshed vs exact volume, sliver/coarse warnings), the artifact format (.msh ASCII 2), and the pre-mesh work cap with its estimator formula and 60000-element / 1/1000-diagonal refusal as input.too_large.

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?

Core identity and required input are front-loaded in the first two sentences, with limits and setup trailing. The second sentence is heavily nested with parentheticals and could be split, but nearly every clause conveys actionable information.

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 meshing tool with external dependencies and hard limits, the description covers inputs, refusals, artifact output, quality diagnostics, and environment setup. Return-value detail is somewhat redundant given an output schema exists, but nothing an agent needs to call it successfully is missing.

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 baseline is 3, but the description adds real meaning: element_size is a target edge length with a mandatory unit ('5 mm'), geometry is read in millimetres, and the size interacts with the element-count cap. It reinforces rather than duplicates 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 precise verb+resource: a second-order 10-node tetrahedral FEM mesh of one solid built with Gmsh. It also scopes the input formats and distinguishes itself implicitly from geometry_measure by noting the shared loader, so an agent can tell this apart from measuring or solving.

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 clear operating context: supply element size with a unit, only one solid, and it will refuse oversized requests. Prerequisites (optional cad extra, Gmsh on PATH or ENG_TOOLKIT_GMSH, run toolkit_doctor) are spelled out. It stops short of explicitly saying when to prefer this over fem_static or geometry_measure.

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