Skip to main content
Glama
Lumitorus

FreeCAD MCP Next

by Lumitorus

run_fem_analysis

Run CalculiX solver on an existing Fem::FemAnalysis and get max von Mises stress, displacements, and node count. Returns error details and working directory if simulation fails.

Instructions

Run the CalculiX solver on an existing Fem::FemAnalysis container and return summary results.

Prerequisites in the document:
- A Part-derived solid (e.g. Part::Box, PartDesign::Body) acting as the geometry.
- A Fem::AnalysisPython container created via `create_object`.
- A Fem::MaterialCommon assigned to the geometry, added to the analysis.
- A Fem::FemMeshGmsh referencing the geometry, added to the analysis (the
  mesh is generated automatically when created via `create_object`).
- At least one Fem::ConstraintFixed and one Fem::ConstraintForce (or
  ConstraintPressure) bound to faces of the geometry, added to the analysis.

A SolverCcxTools is auto-created if the analysis has none.

The solver runs synchronously on the FreeCAD GUI thread and blocks all
other RPC calls for its duration; do not fan out parallel requests.

Returns max von Mises stress (MPa), max/min displacement (mm), node count,
and the working directory CalculiX wrote to. On failure, returns the
prerequisite-check or solver error along with the working directory for
triage.

Args:
    doc_name: Name of the FreeCAD document.
    analysis_name: Name of the Fem::AnalysisPython object.
    timeout: Seconds to wait for the solver (default 600).
    include_screenshot: Whether to return a screenshot of the model (default True).
        Set to False to save tokens when only the numeric results are needed.
    view_name: The view orientation of the returned screenshot (default "Isometric").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeoutNo
doc_nameYes
view_nameNoIsometric
analysis_nameYes
include_screenshotNo
Behavior5/5

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

With no annotations provided, the description carries the full responsibility and handles it well. It discloses that a SolverCcxTools is auto-created if absent, that execution blocks the GUI thread synchronously, what happens on failure, and what return values are produced. This is substantial behavioral transparency beyond the input 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?

The description is well-structured with clear labeled sections: prerequisites, behavior note, return values, and arguments. It is long because the tool is complex, but every sentence provides necessary operational detail without redundancy.

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?

Given the tool has 5 parameters, no annotations, and no output schema, the description is remarkably complete. It covers prerequisites, side effects, synchronous blocking, failure behavior, output data, and parameter semantics, giving the agent all needed context to invoke the tool correctly.

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

Parameters5/5

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

The schema has 0% description coverage, but the Args section fully compensates by explaining every parameter beyond raw schema definitions. It adds practical guidance such as 'Set to False to save tokens when only the numeric results are needed' for include_screenshot and clarifies the meaning of timeout and view_name.

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: 'Run the CalculiX solver on an existing Fem::FemAnalysis container and return summary results.' This clearly distinguishes it from sibling tools like create_object, get_object, and edit_object, which manage objects rather than execute an analysis.

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 prerequisites section thoroughly explains the conditions required before using the tool, and the blocking-behavior warning explicitly tells the agent when not to use it in parallel: 'do not fan out parallel requests.' It does not explicitly name alternative tools, but no sibling tool provides equivalent functionality, so the context is clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Lumitorus/freecad-mcp-next'

If you have feedback or need assistance with the MCP directory API, please join our Discord server