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_infoConfig helpers:
get_config_text,parse_config,update_config_entriesMesh and setup:
set_mesh,generate_mesh_from_stepSolver execution:
run_su2_solver,generate_deformed_meshResults inspection:
list_result_files,get_result_file_base64,read_history_csv,sample_surface_solutionAvailability 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.
Without initial_config the session’s config.cfg starts from the project’s laptop preset: Euler, ROE with MUSCL, CFL 1 adaptive, 250 iterations, FARFIELD and WALL markers as the mesher names them, forces monitored on WALL, CL and CD in the history and on screen. The case is not set: MACH_NUMBER, AOA and REF_AREA must be set with su2_update_config_entries before su2_run_su2_solver will run. For the validated one-call route use su2_run_aero, which the aircraft-mcp gateway offers (this server alone does not).
- 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=None, output_mesh_name='mesh.su2', geo_template_path=None, gmsh_timeout_seconds=600, surface_density=30, farfield_factor=10.0, surface_size_m=None, step_path=None)[source]
Generate a 3D SU2 mesh from a STEP file and attach it to the given session.
Give the STEP either as
step_path(thecad_pathreturned by tigl export_configuration_cad; preferred, the servers share a machine) or asstep_base64(the file content). Until 2026-10-08 only the content form existed, and a model-driven client that had to copy a 536,000- character string between two tools copied 528 of them.By default this runs the same aircraft mesher the CPACS adapter and the paper’s runs use (Gmsh Python API: farfield box sized from the geometry, fragment against the imported solids, FARFIELD and WALL markers, a 3D algorithm fallback chain). It handles metre-scaled, multi-solid TiGL exports with intersecting wing and fuselage solids, which the static template cannot. Until 2026-09-30 the static millimetre-scaled template was the only path, and a colleague’s integration could not mesh the D150 through this endpoint at all.
Sizing matches the adapter:
surface_densityis the span-based preset knob (laptop 30, workstation 80, industry 200), andsurface_size_mis the absolute chord-based cell size that takes precedence when given.Pass
geo_template_pathto use a custom .geo template through the gmsh CLI instead (the template must Merge “model.step” and define FARFIELD and WALL physical surfaces).- Parameters:
session_id – Existing SU2 session (create_su2_session first).
step_base64 – Base64-encoded STEP file content (the cad_base64 field from tigl export_configuration_cad with include_base64=true). Not needed when step_path is given.
output_mesh_name – Filename for the mesh in the session workdir.
geo_template_path – Optional path to a .geo file (CLI path).
gmsh_timeout_seconds – Timeout for the gmsh CLI subprocess.
surface_density – Span / near-field cell size ratio (default 30).
farfield_factor – Farfield box extent in spans (default 10).
surface_size_m – Absolute near-field cell size in metres; overrides surface_density when set.
step_path – Path of the STEP file on this machine (the cad_path from tigl export_configuration_cad). Preferred over step_base64.
- Returns:
Dict with mesh_path, success, and optional error.
- 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_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, allow_incomplete_config=False)[source]
Run a SU2 solver process and capture output metadata.
For SU2_CFD the configuration must set MARKER_MONITORING, MACH_NUMBER, AOA and REF_AREA; otherwise the tool returns an error of type config_incomplete and runs nothing. Without MARKER_MONITORING SU2 evaluates the force coefficients on no surface and writes CL = CD = 0.0 (two model-driven runs on 2026-10-08); without the other three it runs a case nobody specified. allow_incomplete_config=True skips the check for runs that want no force coefficients.
- 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.