Skip to main content
Glama

FEM Run

fem_run
Destructive

Executes CalculiX solver synchronously for small FEM analyses that finish in seconds, returning results after completion.

Instructions

Run the CalculiX solver on an analysis. BLOCKS the MCP channel until the solve finishes (up to 600 s).

Which to reach for: fem_run for small solves — a coarse mesh, linear static, a few thousand nodes — that finish in seconds, where a poll round-trip only adds latency. fem_run_submit for anything that may take a minute or more (fine or 2nd-order meshes, modal/buckling with many modes, nonlinear material or geometry), so the channel stays free while ccx runs.

workdir defaults to <TMPDIR>/ankusdrive_fem_<worker pid>, which is removed when the worker exits (close_workspace, restart_worker, server shutdown); name your own workdir to keep the .inp/.frd/.dat. Raises if ccx exits non-zero (with its *ERROR lines), or if a fem_run_submit solve is still running on this analysis or workdir. Returns {workdir, status: 'ok', returncode, analysis_type, result_objects, analysis}.

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": {
      "analysis": "<analysis>"
    },
    "name": "fem_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
workdirNo
analysisYes
workspaceNoRun this call in this named workspace

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.7
    • addedInput schema / properties / workspace
      Added value: +{
      +  "default": "",
      +  "description": "Run this call in this named workspace",
      +  "title": "Workspace",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

The description discloses key behavior beyond the annotations: the call blocks the MCP channel for up to 600 s, the default workdir is temporary and removed on worker exit, and errors are raised for non-zero ccx exits or conflicting submits. It also states the return shape, which is useful because no output schema exists.

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?

The description is front-loaded with the primary action and blocking constraint, then moves efficiently through tool choice, workdir behavior, and errors. The detail is dense but every paragraph serves a distinct purpose.

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 blocking solver tool with no output schema, the definition covers the important operational context: runtime blocking, alternatives, workdir lifetime, error conditions, and the returned fields. An agent has enough information to choose and invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 33%, so the description must carry more of the parameter burden. It explains workdir well, including its default and how naming it preserves .inp/.frd/.dat files, but it adds little about the required analysis parameter beyond the phrase 'on an analysis'.

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 gives a specific verb and resource: run the CalculiX solver on an analysis. It explicitly distinguishes fem_run from the sibling fem_run_submit by naming both and explaining the size/latency split.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states exactly when to use fem_run: small, fast solves such as coarse linear static models. It also names the alternative fem_run_submit for anything likely to take a minute or more, including the specific conditions that select it.

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