Skip to main content
Glama

run_fem

Runs linear-static finite element analysis on one solid to compute maximum von Mises stress, displacement, and yield safety factor, returning a stress plot PNG for validation.

Instructions

Linear-static FEM (Gmsh 2nd-order tetrahedra + CalculiX) on ONE solid. Returns max von Mises (MPa), max displacement (mm), yield safety factor, mesh size, and a colour plot of von Mises (returned as an image and saved as PNG). fixed_faces: fully fixed faces (several fixtures allowed): 1-based indices from list_faces, a selector string such as 'normal:-Z z:min' (see list_faces), or a list mixing selectors and index lists, which are united. loads: list of dicts, each with faces (indices or selector) and either force_n (total force in newtons, spread over those faces) + direction [x,y,z], or pressure_mpa (acts normal into the face). Example: loads=[{"faces": "normal:+X x:max", "force_n": 500, "direction": [0,0,-1]}]. material defaults to the object's material. mesh_size is the max element edge in mm: smaller is more accurate and slower (keep >= thickness/2; 3-5 mm is fine for hand-sized parts, runtime seconds to a minute). Stress at the edge of a fixed/loaded face is a numerical singularity, so max_von_mises_mpa (and the safety factor) ignore nodes within exclude_mm (default = mesh_size) of those edges; *_raw values include them. Fillet sharp corners and refine the mesh before trusting stress concentrations.

Input Schema

NameRequiredDescriptionDefault
docYes
nameYes
loadsYes
materialNo
mesh_sizeNo
plot_viewNoiso
exclude_mmNo
fixed_facesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

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 well: it discloses the solver stack, expected runtime range, output metrics and plot behavior, the numerical singularity issue at fixed/loaded edges, and the exclude_mm filtering along with raw vs filtered stress values. These are substantive behavioral traits beyond the schema.

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

Conciseness5/5

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

Despite being longer than a simple CRUD description, every sentence carries useful engineering or parameter guidance for a complex FEM tool. It is front-loaded with purpose and returns, then moves into parameter semantics and caveats without wasted prose.

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

Completeness4/5

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

For a complex 8-parameter simulation tool with no annotations or output schema, the description is substantially complete: it explains return values, runtime expectations, singularity handling, and core parameter usage. Minor gaps remain around plot_view and doc/name semantics, but an agent could invoke the tool correctly from this description.

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 description coverage is 0%, so the description must compensate. It explains fixed_faces selectors and indices, the loads dict structure with force_n/direction versus pressure_mpa, material defaulting, mesh_size meaning and practical bounds, and exclude_mm behavior. It does not explain plot_view or the doc/name parameters, leaving some gaps, but the critical simulation parameters are well covered.

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 first sentence names the specific analysis method (linear-static FEM with Gmsh/CalculiX), states the exact scope (ONE solid), and lists the returned results. This is clearly distinguishable from CAD modification siblings like fillet, boolean, or mass_properties, and an agent can tell what domain this tool belongs to.

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?

The description gives clear operational context: it is for one solid, requires fixed faces and loads, defaults material from the object, and recommends mesh sizing and fillet refinement before trusting stress concentrations. It stops short of explicitly naming alternatives or saying when not to use the tool, but the constraints and pitfalls provide strong guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.