Skip to main content
Glama
eng-toolkit

eng-toolkit

by Lin830326

Fem View

fem_view

Generate a PNG and GLB view of FEM static results, colored by a selected field and optionally deformed, to inspect stress or displacement without rerunning the solver.

Instructions

A fem_static result as a PNG picture (isometric view, colour bar with field, unit, min and max, size in mm, a ring on the largest value; returned in the reply too, inline_image: hand it over first) and a GLB for 3D viewers: the mesh surface (6-node facets as 4 triangles) coloured by the nodal field of CalculiX, optionally deformed. Give result_dir (the fem_static job directory; manifest sha256s are checked) or mesh_file + results_file. field: von_mises, displacement, ux uy uz, s_xx s_yy s_zz s_xy s_yz s_zx, principal_max, principal_min. colormap auto (sequential for magnitudes, diverging blue-grey-red for signed fields, light grey = 0, ranges symmetric about zero). GLB is metres, +Y up; COLOR_0 linear RGB, _FIELD holds the values. Also writes legend.svg and view.json. Returns triangle_count, field_max, field_min, deformation_factor. Capped at 1,000,000 triangles. Surface only; nodal stresses are extrapolated, averaged, and unbounded at point loads and sharp corners. No solver run.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "fem_view"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoNode name in the GLB and title of the legend, 1 to 64 printable charactersfem_view
fieldNovon_mises (default), displacement, ux, uy, uz, s_xx, s_yy, s_zz, s_xy, s_yz, s_zx, principal_max or principal_minvon_mises
rangeNo'auto' or 'lo, hi' with units, e.g. '0 MPa, 250 MPa'; diverging ranges expand symmetrically about zero (light grey)auto
previewNo'png' (default; 'iso' is the same): also write fem_view.png, a picture with colour bar, unit and range; 'none': GLB onlypng
colormapNo'auto' (sequential for von_mises/displacement, diverging otherwise), 'sequential' or 'diverging'auto
mesh_fileNoWithout result_dir: the mesh.msh a fem_static run wrote
mesh_edgesNoDraw the element edges of the surface as a line primitive
result_dirNoJob directory of a fem_static run (holds manifest.json); or leave empty and give mesh_file + results_file
max_secondsNoWall-clock budget in seconds, 1 to 600; default 120
output_unitNoUnit of the values and labels: a stress unit (default MPa) or a length unit (default mm)auto
inline_imageNotrue (default): the PNG also comes back as an image block in the reply when it is <= 600 kB; false: path only.
results_fileNoWithout result_dir: the results.csv of the same fem_static run
deformation_scaleNo'0' undeformed, 'auto' (largest displacement = 5 % of the diagonal) or a factor up to 1e4, e.g. '200'0
show_undeformed_edgesNoWhen deformed, draw the undeformed feature edges as a grey line primitive

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

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

With no annotations present, the description carries the full load and does so: 1,000,000-triangle cap, max_seconds budget, 600 kB inline-image limit, GLB in metres with +Y up and linear RGB COLOR_0/_FIELD, and a numerical caveat that nodal stresses are extrapolated, averaged and unbounded at point loads and sharp corners. That is the kind of context structured fields cannot convey.

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?

It is front-loaded with the outputs, which is good, but it is a single dense paragraph mixing output description, input contract, unit conventions and caveats, and it repeats schema-documented details like the field list and colormap behaviour. The long parenthetical about the PNG contents and 'inline_image: hand it over first' is hard to parse.

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?

An output schema exists, so listing return values is redundant but harmless, and the description still covers the complexity an agent needs: file prerequisites, caps, units, colour semantics and known numerical limits. It omits where legend.svg and view.json are written, which is the main remaining gap for a 14-parameter tool.

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 the baseline is 3, but the description adds real meaning: it explains the either/or contract between result_dir and mesh_file + results_file with sha256 verification, and restates the field and colormap semantics with the light-grey-zero divergence rule. The field/colormap enumeration largely duplicates the schema, keeping it below 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?

The first clause names the concrete output (a fem_static result as a PNG plus a GLB for 3D viewers) and the closing 'No solver run' separates it from the fem_static sibling. An agent can tell this is a post-processing/visualisation tool 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?

It gives actionable invocation guidance: supply result_dir (checked against manifest sha256s) or mesh_file + results_file, and 'hand over first' for the inline image. It stops short of explicit when-to-use vs when-not alternates such as fem_mesh or geometry_view, so the routing is implied by the input requirements rather than stated.

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