Skip to main content
Glama
eng-toolkit

eng-toolkit

by Lin830326

Fem Static

fem_static

Runs linear static finite element analysis on a solid CAD model, meshing and solving it to report maximum displacement, von Mises stress, and reaction forces.

Instructions

Linear static finite element analysis (small displacements, linear elastic isotropic material, 10-node tetrahedra) of one solid in a CAD file (.step .stp .iges .igs .brep, read in millimetres), meshed by Gmsh and solved by CalculiX; the toolkit writes both inputs, the caller never supplies a script or deck. Returns max_displacement: magnitude; see values.max_displacement_ux/uy/uz (the length of the displacement vector, which exceeds the bending deflection) and where it is, the per-axis maxima max_displacement_ux/uy/uz (largest |ux|, |uy|, |uz| over the nodes; read a deflection from the axis it acts on, and sideways motion from the other axes; data.displacement_note says so), the maximum von Mises stress and where, and the total reaction force against the applied load (equilibrium must hold to 1e-6 or the call fails). Artifacts: the CalculiX deck, .frd and .dat results, and results.csv with every node's displacement and stress. 'supports' and 'loads' are ';'-separated clauses that pick faces by plane. Face selector: 'x = 0 mm' (all boundary faces lying in that plane) or 'normal +z at z = 20 mm' (only faces whose outward normal is +z); axis x, y or z. Support: ' [: dofs]' with dofs 'fixed' (default, ux=uy=uz=0) or any of ux uy uz, or 'point(0 mm, 5 mm, 0 mm) : uy' (the nearest mesh node, within one element size). Load: 'force (0 N, 0 N, -10 kN) on x = 100 mm' (total force spread evenly over the face by area) or 'pressure 5 MPa on z = 20 mm' (positive pushes into the material). A selector that matches no face, a support face that is also loaded, and a model whose supports leave a rigid-body motion free are errors that say so. Fixing a whole face over-constrains the Poisson contraction there (the stress near it is higher than the textbook value); to avoid that, constrain only ux on the face and add point supports on the remaining motions. The work is capped (max 60000 elements, estimated before meshing). Linear only: no plasticity, contact, large displacement, dynamics or temperature. Needs the optional cad engine (uv sync --extra cad) and Gmsh and CalculiX installed by you (ENG_TOOLKIT_GMSH, ENG_TOOLKIT_CCX; run toolkit_doctor).

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>",
      "youngs_modulus": "<youngs_modulus>",
      "poisson_ratio": "<poisson_ratio>",
      "supports": "<supports>",
      "loads": "<loads>"
    },
    "name": "fem_static"
  }
}

Input Schema

NameRequiredDescriptionDefault
loadsYes';'-separated loads, e.g. 'force (10 kN, 0 N, 0 N) on x = 100 mm' or 'pressure 2 MPa on normal +z at z = 20 mm'
supportsYes';'-separated supports, e.g. 'x = 0 mm' (fixed face) or 'x = 0 mm : ux; point(0 mm, 5 mm, 0 mm) : uy; point(0 mm, 0 mm, 5 mm) : uz'
model_pathYesPath to a solid model: .step .stp .iges .igs or .brep
element_sizeYesTarget element edge length with unit, e.g. '2.5 mm'; halve it to check convergence
poisson_ratioYesPoisson's ratio, a plain number between -1 and 0.5 (exclusive), e.g. 0.3
youngs_modulusYesYoung's modulus with unit, e.g. '210 GPa' or '210000 MPa'
output_length_unitNoLength unit of displacements, e.g. 'mm' (default), 'um', 'inch'mm
output_stress_unitNoUnit of stresses, e.g. 'MPa' (default), 'psi', 'bar'MPa

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, the description carries the whole burden and does so: it states the caller supplies no deck, lists produced artifacts (deck, .frd, .dat, results.csv), declares an equilibrium tolerance that can fail the call, discloses a 60000-element pre-mesh estimate, and names required external binaries via toolkit_doctor.

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?

Purpose and model scope are front-loaded, but the middle is a long semicolon-chained run-on, and since an output schema exists, the extended explanation of max_displacement_ux/uy/uz and its note is largely redundant. The over-constraint paragraph is valuable but could be tightened.

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, multi-dependency simulation tool this is thorough: input grammar, failure modes, physical caveats about Poisson contraction, work limits, and install requirements are all covered. Nothing an agent needs to formulate a first correct call 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 semantics the schema lacks: the face-selector grammar ('x = 0 mm' vs 'normal +z at z = 20 mm'), dof clause syntax, point-support snapping to the nearest mesh node within one element size, and force-vs-pressure sign convention. It leaves output_length_unit/output_stress_unit unelaborated, keeping it from a 5.

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: 'Linear static finite element analysis ... of one solid in a CAD file', and pins down the solver chain (Gmsh mesh, CalculiX solve) plus supported formats. An agent can distinguish this from mesh/view/structures siblings without opening the schema.

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?

Explicit when-not guidance is given: 'Linear only: no plasticity, contact, large displacement, dynamics or temperature', plus size cap and dependency prerequisites. It does not point to any alternative tool (e.g. a mesh or 3D-structures sibling), so it falls short of the full when/when-not/alternatives bar.

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