Tools and capabilities#

Tool availability model#

PyMechanical-MCP uses connection-aware visibility.

  • Offline-capable tools are available before any Mechanical session.

  • Live-session tools use REQUIRES_MECHANICAL_TAG and remain hidden until you successfully call launch_mechanical or connect_to_mechanical.

  • If you use --connect-on-startup, live-session tools are available immediately, and PyMechanical-MCP locks the connection lifecycle tools.

Always available (before connection)#

Tool

Description

check_mechanical_installed

Verify that Mechanical is installed and discoverable.

check_mechanical_status

Inspect current MCP connection state.

list_mechanical_instances

List running Mechanical processes.

launch_mechanical

Start a new Mechanical session.

connect_to_mechanical

Attach to an existing Mechanical instance.

get_guidelines_for

Return workflow guidance by topic.

Available after connection#

Tool

Description

disconnect_from_mechanical

Gracefully detach from Mechanical.

run_python_code

Execute Python snippets in the persistent session.

create_custom_plot

Produce custom plots from analysis data.

clear_mechanical

Clear context and release session resources.

run_python_script

Execute a Mechanical script string or read one from a local file with file_path.

save_project

Save active project.

open_project

Open an existing MECHDB project.

upload_file

Upload local file to Mechanical working directory.

download_file

Download file from Mechanical working directory.

list_files

List files in working directory.

solve_analysis

Solve active analysis system.

get_model_info

Return a structured model summary (geometry, mesh, analyses, results).

screenshot

Capture current Mechanical view.

get_mechanical_logs

Retrieve Mechanical logs for diagnostics.

export_results

Export result objects and artifacts.

Note

When you run with --connect-on-startup, PyMechanical-MCP disables the launch_mechanical, connect_to_mechanical, and disconnect_from_mechanical tools by design.

Guideline topics#

get_guidelines_for supports these topic values:

  • workflow

  • geometry

  • materials

  • meshing

  • analysis_setup

  • boundary_conditions

  • solution

  • postprocessing

  • named_selections

  • general

Tool set discovery resource#

PyMechanical-MCP exposes toolsets://definition for service-side discovery. The payload groups tools into:

  • lifecycle

  • scripting

  • project-management

  • file-management

  • simulation

  • inspection

  • results

  • guidelines

This resource is read-only metadata. It does not modify runtime behavior.

Example workflows#

Static structural run#

  1. check_mechanical_status

  2. launch_mechanical or connect_to_mechanical

  3. upload_file (geometry)

  4. run_python_script (import geometry, assign material, and mesh)

  5. run_python_script (apply boundary conditions and loads)

  6. solve_analysis

  7. export_results and screenshot

Checks after solving#

  1. get_model_info for verifying solved state

  2. get_mechanical_logs for warnings and errors

  3. run_python_code for custom data extraction

  4. export_results for report artifacts

Feature reference#

For complete parameter signatures and return values for all tools, see API reference.

Next steps#