Tool Catalog

The current tool catalog is assembled by su2_mcp.fastmcp_server.build_server.

Available tool groups

  • Session lifecycle: create_su2_session, close_su2_session, get_session_info

  • Config helpers: get_config_text, parse_config, update_config_entries

  • Mesh and setup: set_mesh, generate_mesh_from_step

  • Solver execution: run_su2_solver, generate_deformed_mesh

  • Results inspection: list_result_files, get_result_file_base64, read_history_csv, sample_surface_solution

  • Availability and health: get_su2_status, ping

Tool bundle exports.

class su2_mcp.tools.PingRequest(*, message=None)[source]

Request payload for the ping tool.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class su2_mcp.tools.PingResponse(*, ok=True, message, server, timestamp)[source]

Response payload for the ping tool.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

su2_mcp.tools.analyze_mesh(session_id)[source]

Analyze the mesh attached to a session and return diagnostics.

Reports element counts by type, node count, boundary marker summary, and estimated solver runtime scaling factors to help diagnose latency.

su2_mcp.tools.close_su2_session(session_id, delete_workdir=False)[source]

Close a session and optionally delete its working directory.

su2_mcp.tools.create_su2_session(base_name=None, initial_config=None, initial_mesh=None, mesh_file_name='mesh.su2')[source]

Create a new SU2 session and return basic paths.

su2_mcp.tools.generate_deformed_mesh(session_id, def_config_path=None, output_mesh_name='mesh_def.su2', max_runtime_seconds=600)[source]

Run SU2_DEF to create a deformed mesh.

su2_mcp.tools.generate_mesh_from_step(session_id, step_base64, output_mesh_name='mesh.su2', geo_template_path=None, gmsh_timeout_seconds=600)[source]

Generate a 3D SU2 mesh from a STEP file and attach it to the given session.

Uses a .geo template that merges the STEP, builds an aircraft volume (surface loop -> volume), creates a farfield box, and meshes the fluid domain with FARFIELD and WALL markers. Requires the gmsh CLI to be on PATH.

Parameters:
  • session_id – Existing SU2 session (create_su2_session first).

  • step_base64 – Base64-encoded STEP file content (e.g. from TiGL export).

  • output_mesh_name – Filename for the mesh in the session workdir.

  • geo_template_path – Optional path to a .geo file.

  • gmsh_timeout_seconds – Timeout for the gmsh subprocess.

Returns:

Dict with mesh_path, success, and optional error.

su2_mcp.tools.get_config_text(session_id)[source]

Return raw config text for the session.

su2_mcp.tools.get_result_file_base64(session_id, relative_path, max_bytes=104857600)[source]

Return a base64-encoded slice of a result file.

su2_mcp.tools.get_session_info(session_id)[source]

Return session paths and last run metadata.

su2_mcp.tools.get_su2_status()[source]

Return SU2 availability information for the host.

Returns:

Mapping that indicates whether any SU2 binaries are available alongside per-binary details.

Examples

>>> status = get_su2_status()
>>> set(status.keys()) == {"installed", "binaries", "missing"}
True
su2_mcp.tools.list_result_files(session_id, extensions=None)[source]

List result files produced within a session directory.

su2_mcp.tools.parse_config(session_id)[source]

Parse the session configuration into key/value entries.

su2_mcp.tools.ping(args)[source]

Return a simple health check response without requiring SU2.

The tool intentionally avoids importing SU2 or touching the filesystem so that MCP clients can verify connectivity even when SU2 binaries are unavailable.

su2_mcp.tools.read_history_csv(session_id, relative_path, columns=None, max_rows=1000, skip_rows=0)[source]

Read a subset of a history CSV file.

su2_mcp.tools.run_su2_solver(session_id, solver='SU2_CFD', config_override_path=None, max_runtime_seconds=600, capture_log_lines=100)[source]

Run a SU2 solver process and capture output metadata.

su2_mcp.tools.sample_surface_solution(session_id, relative_path, marker_name, fields, max_points=5000)[source]

Sample surface solution fields from a CSV-like file.

su2_mcp.tools.set_mesh(session_id, mesh_base64, mesh_file_name='mesh.su2', update_config=True)[source]

Persist a mesh file for the session and update the config.

su2_mcp.tools.update_config_entries(session_id, updates, create_if_missing=True)[source]

Update configuration entries for a session.