Skip to main content
Glama

FEM Mesh

fem_mesh

Create a Gmsh tetrahedral mesh for a body within an analysis. Set maximum element size and choose 1st- or 2nd-order elements to improve bending and modal accuracy.

Instructions

Create a Gmsh mesh of body, attached to analysis.

char_length: max characteristic element length in mm. 0 = let Gmsh pick. element_order: '1st' or '2nd' (quadratic). Use '2nd' for bending/modal accuracy — linear tets (C3D4) shear-lock and overstiffen thin sections (a cantilever's first natural frequency lands ~50% high with only 1-2 elements through the thickness; 2nd-order tets bring it within ~1% of beam theory). Default lets Gmsh choose. Returns {handle, name, nodes, tets}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes
nameNoMesh
analysisYes
char_lengthNo
element_orderNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false, destructiveHint=false, and openWorldHint=false, which already signal this is a non-destructive creation operation. The description adds valuable behavioral context: it explains the consequences of using linear tets (shear-locking, overstiffening, ~50% high natural frequency) and the benefit of 2nd-order tets (~1% accuracy). It also discloses the return value shape ({handle, name, nodes, tets}). This goes beyond the annotations without contradicting them.

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 compact and front-loaded with the core action. The element_order guidance is a bit long but earns its place because it directly affects result accuracy. The return value is listed at the end. It could be slightly tighter, but every sentence adds value.

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 mesh-creation tool with 5 parameters and no output schema, the description covers the key decision (element_order), the key sizing parameter (char_length), and the return shape. It does not mention the 'name' parameter or any prerequisites (e.g., that an analysis must already exist), but the required parameters are clear and the tool is a creation step, not a complex workflow. The absence of an output schema makes the return-value disclosure particularly valuable.

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 does: char_length is explained as 'max characteristic element length in mm' with the 0 = auto behavior. element_order is explained with concrete guidance and a default. The required parameters body and analysis are described in the opening sentence. The only minor gap is the 'name' parameter, which is not mentioned, but its default is 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?

The description opens with a specific verb and resource: 'Create a Gmsh mesh of `body`, attached to `analysis`.' This clearly distinguishes it from sibling tools like fem_run, fem_modal, and fem_mesh_refinement, which handle different stages of the FEM workflow. The title 'FEM Mesh' is expanded into a concrete action.

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 context for when to use this tool: it is the mesh-creation step for an analysis. It also provides guidance on element_order selection ('Use '2nd' for bending/modal accuracy') and explains the default behavior. However, it does not explicitly state when NOT to use it or name alternative tools for meshing (e.g., fem_mesh_refinement), so it falls just short of a 5.

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