Skip to main content
Glama
loumalouomega

Kratos MCP Server

mesh_generate_gmsh

Mesh polygons, 3D shapes, or CAD files with gmsh and export them as .mdpa for Kratos finite element simulations.

Instructions

Mesh arbitrary geometry with gmsh (optional extra: uv sync --extra gmsh) and write it as .mdpa. kind: 'polygon' -- vertices [[x, y], ...] (counter-clockwise) with optional holes (list of vertex loops); physical groups become sub model parts: domain, side_ (outer edge i), hole_; quads=true recombines into quadrilaterals. 'shape' -- 3D tetrahedra of shape 'box' (shape_params {size_xyz: [lx, ly, lz], origin}), 'cylinder' ({radius, height}) or 'sphere' ({radius}); parts domain, boundary. 'file' -- mesh a CAD/geometry file (cad_file: .step, .brep, .geo, .iges...) in dimension dim; its physical groups are kept, else domain/boundary are created. size is the target element size (size_min the lower bound, default size/10). element_name / condition_name set the Kratos types (defaults Element2D3N / LineCondition2D2N / Element3D4N / SurfaceCondition3D3N). gmsh runs in a subprocess, never inside the server. Returns the mesh summary and the gmsh physical groups.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dimNo
kindYes
sizeNo
holesNo
quadsNo
shapeNo
outputYes
timeoutNo
cad_fileNo
size_minNo
verticesNo
overwriteNo
property_idNo
element_nameNo
shape_paramsNo
condition_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden. It usefully states that gmsh runs in a subprocess (never in the server) and that it returns the mesh summary and physical groups, which is real behavioral context. However, it says nothing about how the existing output file is handled (the overwrite parameter), timeouts, or failure modes for a tool that writes files.

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 main action is front-loaded, then kind-based blocks organize the per-mode parameters compactly; little is wasted. Density is high by necessity given 16 parameters, though the wrapped indentation is slightly awkward to scan.

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 16-parameter generator with no annotations, the description covers mode selection, geometry inputs, sizing, naming defaults, and the subprocess behavior. An output schema exists so return values needn't be restated. It is close to complete, missing only the semantics of timeout, property_id, and overwrite.

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% across 16 parameters, so the description must compensate, and it does for most: vertices, holes, quads, shape, shape_params (with per-shape keys), cad_file, dim, size, size_min, kind, element_name, condition_name, and output are all given meaning. Only timeout, property_id, and overwrite are left undefined, a minor residue.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb+resource+output ('Mesh arbitrary geometry with gmsh ... write it as .mdpa'), then enumerates the three distinct operating modes (polygon/shape/file). This is far clearer than a tautology, but it never names or contrasts against siblings like mdpa_create_geometry_mesh, mdpa_create_structured_mesh, or mesh_remesh, so the agent must infer its niche.

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?

It explains when to pick each kind — 'polygon' for vertex loops with optional holes, 'shape' for 3D box/cylinder/sphere, 'file' for CAD/geometry files — which is genuine conditional guidance. It also flags the prerequisite installation (uv sync --extra gmsh). It stops short of stating when to prefer this tool over sibling meshers.

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