dualsphysics-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dualsphysics-mcpRun a dam-break validation and show the error metrics"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DualSPHysics MCP
Language: English | 中文
DualSPHysics MCP wraps a local DualSPHysics SPH fluid-solver toolchain as seven Model Context Protocol tools: case pre-processing (GenCase), background CPU simulation with progress parsing, post-processing (PartVTK / MeasureTool) and a quantitative dam-break validation against the Koshizuka & Oka (1996) experiment. The intended user is an agent (or a human driving an MCP client) that needs to run and verify SPH simulations, not just stare at them.
The server only launches the DualSPHysics command-line tools as subprocesses. DualSPHysics itself is not distributed here: it is free software under LGPL-2.1-or-later, and because this package neither links nor redistributes its code or binaries, the MIT licence of this repository carries no additional obligations. If you use DualSPHysics in published work, cite Dominguez et al. (2022), "DualSPHysics: from fluid dynamics to multiphysics problems", Computational Particle Mechanics 9:867–895, doi:10.1007/s40571-021-00404-2.
Tools
Tool | Purpose |
| Probe GenCase / solver / PartVTK / MeasureTool: resolved path, provenance (env var, PATH, scan), version, solver feature flags (e.g. builds without WaveGen); install hints when missing. |
| Run GenCase: case |
| Start the CPU solver in the background (jobs/ directory, |
| Poll a job: state, |
| PartVTK: |
| MeasureTool: SPH interpolation at points → CSV time series ( |
| Pure-Python: reconstruct the dam-tip surge front from the MeasureTool CSV and compare against the embedded Koshizuka & Oka (1996) series; per-time errors + MAE/RMSE/max. |
Workflow: check_environment → gencase → run_case → poll job_status →
partvtk (visual) + measure_tool (quantitative) → validate_dambreak.
Related MCP server: MCP-Server-for-CFD
Domain contracts (hard-won facts)
These are behaviours of the wrapped tools that are not obvious from their
-h output; the code depends on each of them.
Run.out row formats differ across versions. v5.0/v5.2 print
Part_0001 0.010016 314 314 494.50 21-06-2022 22:48:14(6 columns); v5.4 prints00001 0.010017 314 314 21,001 2,736 216.96 <date> <time>(8 columns, plain%05dpart number, and thousands separators in the counters). The parser accepts both; progress =PartTime / TimeMax.Time/Secis not steps/second. From solver source (JSph::SaveData): it is wall-clock seconds per simulated second for the last PART; the last two tokens of a row are the solver's own projected finish date-time (its ETA estimate).job_statussurfaces both verbatim.Completion marker is
Finished execution (code=N).(main.cpp); N=0 success. Fatal errors print*** Exception(exc): ...lines first.GenCase argument convention: path bases without
.xml(GenCase CaseX_Def OUT/CaseX). This wrapper accepts both forms and strips the suffix; default output name drops_Def, default output directory is<name>_out. GenCase writes its own log next to the case (CaseX.out), notRun.out.Particle counts come from the VTK headers GenCase writes with
-save:all(POINTS <n> floatis ASCII even when the payload is binary) with the console lineTotal particles: 21,001 (bound=1001 ... fluid=20000)as fallback — beware look-alikes (MassFluid=[0.1]) when parsing.DualSPHysics CSVs default to semicolon separators (
-csvsep:0fromDsphConfig.xml).measure_toolalways appends-csvsep:1(comma) unless the caller passes their own-csvsep;validate_dambreaksniffs both.MeasureTool points files reject leading
#comment lines ("There are not valid points in file"); only inline trailing comments are safe — seeexamples/dambreak_val2d/points_damtip.txt.-pointspaths are resolved against the tool's working directory (the job dir), so the wrapper absolutises them first. Errors print on stdout, not stderr.MeasureTool
-savecsv <prefix>writes<prefix>_<Var>.csv(one file per variable) with a transposed header: PosX/PosY/PosZ rows, aPart,Time [s],Var_0,...header row, thenpart,time,values...data rows.validate_dambreakreads that layout (and a generic time-first one).The solver needs its sibling
.sofiles (libChronoEngine.so,libdsphchrono.so). Some installs set rpath, some don't —run_casetherefore always prepends the solver's directory toLD_LIBRARY_PATH.2D cases are declared by giving the domain definition
pointmin y == pointmax y; the geometry's y extent is clamped to that plane.Solvers built with
-DDISABLE_WAVEGEN(common when building from the GitHub source, which lackslibjwavegen_64) cannot run wave/wavemaker cases;check_environmentreads the solver's-infoJSON and flags it. Dam-break and other gravity-driven cases are unaffected.-ver/-infomay exit non-zero even while printing a correct banner (GenCase-verexits 1).check_environmenttrusts the printed banner, not the exit code.Restart/cancel are not implemented. The interface is the
extra_argspassthrough (e.g.-partbegin:<n>) — everything the solver CLI accepts.
Install
Python 3.10+; the DualSPHysics binaries are discovered from environment
variables, PATH, or conventional install roots (/opt, /usr/local,
~/softwares, ~, cwd → <root>/DualSPHysics*/bin/linux).
# server + dev tools
uv sync # or: python -m venv .venv && .venv/bin/pip install -e .Getting the solver (the GitHub repository ships GenCase/PartVTK/MeasureTool prebuilt but not the solver):
Full package from https://dual.sphysics.org/downloads/ (browser download, includes everything), or
git clone https://github.com/DualSPHysics/DualSPHysicsand build the CPU solver from source:make -f Makefile_cpu(g++ only, no CUDA needed), then copy the prebuilt tools frombin/linux/.
Example layout (also the one used in .env.example /
examples/mcp_config.example.json):
/home/<user>/softwares/DualSPHysics/bin/linux/
├── GenCase_linux64 DualSPHysics5.4CPU_linux64 PartVTK_linux64
└── MeasureTool_linux64 libChronoEngine.so libdsphchrono.so ...Configure via environment variables (no .env parsing; see .env.example):
DSPH_GENCASE=/home/<user>/softwares/DualSPHysics/bin/linux/GenCase_linux64
DSPH_SOLVER=/home/<user>/softwares/DualSPHysics/bin/linux/DualSPHysics5.4CPU_linux64
DSPH_PARTVTK=/home/<user>/softwares/DualSPHysics/bin/linux/PartVTK_linux64
DSPH_MEASURETOOL=/home/<user>/softwares/DualSPHysics/bin/linux/MeasureTool_linux64
DSPH_JOBS_DIR=/abs/path/to/jobs # optional, default ./jobs
DSPH_OMP_THREADS=8 # optional, default all coresRun
.venv/bin/python mcp_server.py # hub-style entry point (stdio)
.venv/bin/dualsphysics-mcp # console script
uvx dualsphysics-mcp # once published to PyPIClient registration templates (uvx and local-venv variants) are in
examples/mcp_config.example.json:
{ "mcpServers": { "dualsphysics-mcp": { "command": "uvx", "args": ["dualsphysics-mcp"] } } }claude mcp add dualsphysics-mcp -- /abs/repo/path/.venv/bin/python /abs/repo/path/mcp_server.pyExample: 2D dam-break validation (Koshizuka & Oka 1996)
examples/dambreak_val2d/ contains the showcase: a programmatically generated
2D dam-break case (dp = 0.01 m; 1 m × 2 m water column in a 4 m × 3 m tank;
TimeMax = 2 s, TimeOut = 0.01 s; Verlet/Wendland/artificial viscosity 0.02/
Fourtakas DDT 0.1 — the official validation layout, regenerated by
gen_dambreak_val2d.py, MIT), a MeasureTool points file tracing the surge
front (401 points along z = 0.03 m), and the digitised experimental series.
Reference numbers (measured with GenCase v5.4.354 / solver v5.4.355, 8 CPU threads, i5-10210U):
Quantity | Value |
Total particles | 21,001 (fluid 20,000 + bound 1,001) |
Part files | 201 ( |
Solver wall time (TimeMax = 2 s) | ≈ 14 min |
Dam-tip MAE vs experiment (full window 0.09–0.75 s) | 0.220 m (22.0 % of the column) |
Dam-tip MAE, early collapse (t ≤ 0.2 s) | ≈ ±0.01–0.16 m |
Wall impact | front pins at 3.98 m at t ≈ 0.67 s |
The front extraction was cross-checked against the solver's own SWL gauge
(GaugesSWL_Swl_z003.csv, mean deviation 8 mm — within the 10 mm point
spacing), so the residual error against the experiment is SPH physics
(the DBC front slightly over-runs the experiment mid-collapse), not a
measurement artefact. The experimental series ends at X/a ≈ 4.13, beyond the
4 m tank, so the comparison saturates after wall impact —
validate_dambreak reports impact_time_s and says so in notes.
Agent transcript:
check_environment() # all four tools found
gencase("examples/dambreak_val2d/CaseDambreakVal2D_Def.xml")
-> particle_counts: total=21001 fluid=20000 bound=1001
run_case("<out>/CaseDambreakVal2D") # returns job_id
job_status(job_id) # poll until percent=100
partvtk(job_id=job_id) # 201 fluid VTK files
measure_tool(job_id=job_id, points_file="examples/dambreak_val2d/points_damtip.txt")
validate_dambreak(csv_path="<measure csv>",
points_file="examples/dambreak_val2d/points_damtip.txt")validate_dambreak reports per-time errors plus MAE / RMSE / max in metres
and as % of the 1 m column, the wall-impact time, and a note when the
comparison saturates.
Tests
uv run pytest -q # or: .venv/bin/python -m pytest
uv run ruff check .The suite is green without any solver installed: tool discovery, command
construction, Run.out parsing (real v5.0/v5.4 log fixtures), validation math
(hand-computed synthetic CSVs) and a stdio end-to-end test that spawns the
server and drives all seven tools. Tests marked solver additionally exercise
the real toolchain when one is installed locally and auto-skip otherwise.
Contents
DualSPHysics-mcp/
├── README.md, README.zh-CN.md this file + Chinese translation
├── LICENSE MIT (this repository)
├── pyproject.toml hatchling, src layout, dualsphysics-mcp entry point
├── mcp_server.py stdio entry shim (hub convention)
├── .env.example DSPH_* variable template
├── src/dualsphysics_mcp/
│ ├── server.py MCPServer + the 7 tools (pydantic results)
│ ├── config.py env vars + tool discovery
│ ├── errors.py stable error codes
│ └── tools/
│ ├── environment.py check_environment
│ ├── gencase.py gencase
│ ├── runner.py + runout.py run_case / job_status (+ Run.out parser)
│ ├── postprocess.py partvtk / measure_tool
│ └── validate.py validate_dambreak (+ embedded experiment)
├── examples/
│ ├── dambreak_val2d/ case XML generator, points, experiment CSV
│ └── mcp_config.example.json client registration templates
└── tests/ pytest suite (solver tests auto-skip)Repository rules
Committed: source, tests, examples (case generator + measurement points +
digitised experiment with attribution), documentation, templates.
Not committed: DualSPHysics binaries or sources (LGPL work stays out),
virtual environments, .env, job outputs (jobs/), generated results
(*_out/, Part_*.bi4, VTK/CSV artefacts), caches, internal tooling
directories. Experimental values in examples/dambreak_val2d/ are digitised
facts cited to Koshizuka & Oka (1996) as shipped with the DualSPHysics
examples; the generated case XML and all code here are original MIT content.
Available Tools
7 toolscheck_environmentA
Probe the DualSPHysics toolchain: paths, versions, solver features.
Reports for GenCase / CPU solver / PartVTK / MeasureTool whether each binary was found (env var, PATH or conventional install dirs), its version, and the solver's feature flags (a build without WaveGen cannot run wave cases). Call this first; missing tools come with install hints.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| hint | Yes | |
| ready | Yes | True when all four tool paths were found |
| tools | Yes | |
| missing | Yes | |
| jobs_dir | Yes | |
| omp_threads | Yes | |
| server_version | Yes | |
| jobs_dir_exists | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses that the tool reports whether binaries were found, their versions, and feature flags, and gives a concrete example of a build without WaveGen. It also mentions install hints for missing tools. While no annotations are provided, the description carries the behavioral burden well, though it could mention whether it modifies anything (it appears read-only).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and front-loaded with the core purpose, then details the specific checks and a concrete example. Every sentence adds value, and the install-hint note is useful without being verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter environment probe with an output schema present, the description fully covers what the tool does, what it reports, and when to use it. The output schema presumably details the return structure, so the description doesn't need to explain return values. Nothing critical is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the schema provides no parameter semantics. The description compensates by explaining what the tool checks and reports, which is sufficient for a no-argument probe tool. Baseline 4 for zero params is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: probing the DualSPHysics toolchain for paths, versions, and solver features. It names specific binaries (GenCase, CPU solver, PartVTK, MeasureTool) and distinguishes it from sibling tools that perform actual simulation tasks.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly instructs to call this tool first, and notes that missing tools come with install hints. This provides clear when-to-use guidance and implies it should precede other tools like run_case or validate_dambreak.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gencaseA
Run GenCase: case XML -> Case.xml + Case.bi4 (+ preview VTK files).
Args: xml_path: Path to the *_Def.xml case definition (with or without .xml). output_dir: Output directory (default: _out next to the XML). out_name: Output case name (default: XML stem minus _Def). save_modes: GenCase -save value (default "all" = bi4 + preview VTKs). extra_args: Extra GenCase flags (e.g. ["-dp:0.02"]).
| Name | Required | Description | Default |
|---|---|---|---|
| out_name | No | ||
| xml_path | Yes | ||
| extra_args | No | ||
| output_dir | No | ||
| save_modes | No | all |
Output Schema
| Name | Required | Description |
|---|---|---|
| command | Yes | |
| out_bi4 | Yes | |
| out_xml | Yes | |
| next_step | Yes | |
| vtk_files | Yes | |
| bi4_exists | Yes | |
| duration_s | Yes | |
| returncode | Yes | |
| stderr_tail | No | |
| stdout_tail | No | |
| particle_counts | Yes | total/fluid/bound particle counts (None = not reported) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses the primary behavior: it runs an external tool and writes multiple output files, and it explains defaults for output_dir, out_name, and save_modes. However, with no annotations, it omits side-effect details such as overwriting behavior, directory creation, environment requirements, and failure modes.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with a one-line summary followed by a compact bullet list of five parameters with defaults. There is no filler; every line adds operational detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given five parameters, zero annotation coverage, and no schema-level parameter descriptions, the description covers all invocation essentials, and the output schema covers return values. It is slightly incomplete on selecting this tool relative to siblings and on prerequisites/environment, but it is sufficient to invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must supply parameter meaning. It does so fully: xml_path accepts *_Def.xml with or without extension; output_dir and out_name have explicit defaults; save_modes is tied to GenCase -save and 'all' is expanded; extra_args is illustrated with an example.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The opening line names a specific action ('Run GenCase') and defines the resource transformation (case XML → Case.xml + Case.bi4 + optional VTKs). This makes the tool's scope clear and separates it from simulation/post-processing siblings, though it never names those alternatives explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or when-not-to-use statements; the presence of sibling tools such as run_case and validate_dambreak is not leveraged. The intended use is only implied by the XML-to-case-file conversion description, so an agent must infer when this step is needed.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
job_statusA
Poll a background solver job: state + Run.out progress digest.
Returns the running state (plus pid/returncode), simulated time vs tmax, percent, step counters, the solver's Time/Sec throughput (wall-clock seconds per simulated second), the solver's own projected finish time, particle counts and the Run.out tail.
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| eta | Yes | Solver's projected finish date-time |
| pid | No | |
| tmax | No | |
| state | Yes | running | succeeded | failed | finished |
| dirout | No | |
| job_id | Yes | |
| command | No | |
| percent | No | |
| eta_note | No | |
| exception | No | |
| last_part | No | |
| particles | Yes | |
| poll_hint | No | |
| returncode | No | |
| started_at | No | |
| finished_at | No | |
| total_steps | No | |
| current_time | Yes | Simulated time of last PART (s) |
| run_out_tail | No | |
| run_out_exists | Yes | |
| steps_last_part | No | |
| wall_sec_per_sim_sec | Yes | Solver Time/Sec column: wall-clock s per simulated s |
| wall_sec_per_sim_sec_note | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It does a strong job by disclosing the exact return contents, including pid/returncode, simulated time vs tmax, percent, step counters, throughput, projected finish time, particle counts, and the Run.out tail. It does not explicitly state that polling is side-effect-free, but "poll" and the data returned convey a read-only status operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core purpose and then provides a dense, useful list of return values. Every sentence earns its place, and there is no redundant or promotional language.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity, one parameter, and an existing output schema, the description is mostly complete. It over-delivers on return-value detail and clearly explains the polling behavior. The main gap is not explaining job_id provenance or when exactly to call this relative to run_case, but these are minor for a status-polling tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must compensate for the single required job_id parameter. It does not mention job_id by name, its format, or how to obtain it (e.g., from run_case). The tool's overall purpose implies job_id identifies a background job, but that is only indirect and does not add meaningful parameter-level guidance.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
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: "Poll a background solver job". It enumerates exactly what the status digest contains (state, pid/returncode, progress counters, throughput, etc.), which makes it distinct from siblings like run_case and validate_dambreak.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly establishes the polling use case and implicitly distinguishes it from launching (run_case) or validating (validate_dambreak). It does not explicitly name alternatives or state that job_id should come from a previous run_case call, but the context is clear enough for this simple status tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
measure_toolA
MeasureTool: interpolate SPH values at points -> CSV time series.
For the dam-break validation use a horizontal line of points just above the bottom (examples/dambreak_val2d/points_damtip.txt) with density (default -vars:-all,rhop): points beyond the surge front read 0, so the furthest wet point is the front position that validate_dambreak compares against the experiment.
Args: job_id: Job whose data/ directory holds the Part_*.bi4 files. dirdata: Explicit particle data directory (alternative to job_id). points_file: MeasureTool points file (POINTS/POINTSLIST/POINTSENDLIST). pointsdef: Inline points definition, e.g. "ptels[x=0:0.01:4,z=0.03]". variables: Variables to interpolate (default density only). onlytype: Particle filter (default fluid only). savecsv: CSV output prefix (default measure/damtip inside the job). savevtk: Optional VTK prefix for the measuring points. extra_args: Extra MeasureTool flags (a -csvsep here overrides ours).
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | No | ||
| dirdata | No | ||
| savecsv | No | measure/damtip | |
| savevtk | No | ||
| onlytype | No | -all,+fluid | |
| pointsdef | No | ||
| variables | No | -all,rhop | |
| extra_args | No | ||
| points_file | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| command | Yes | |
| csv_files | No | |
| next_step | No | |
| vtk_files | No | |
| duration_s | No | |
| file_count | No | |
| returncode | Yes | |
| stderr_tail | No | |
| stdout_tail | No | |
| output_files | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the behavioral disclosure burden. It reveals meaningful behaviors: interpolation produces CSV time series, points beyond the surge front read 0, defaults are fluid-only density, and extra_args can override output settings. It does not cover failure modes or side effects beyond file outputs, but it is still substantially transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well structured: a one-line purpose, a focused use-case paragraph, then a compact args list. Every sentence contributes useful information, and the most important usage guidance is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex tool with 9 optional parameters and no annotations, the description covers all parameters, a realistic validation workflow, defaults, and file outputs. The only notable gap is that neither job_id nor dirdata is marked required in the schema, and the description does not explicitly state that at least one of them must be supplied.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, yet every parameter is explained in plain language. The description clarifies the job_id/dirdata alternative, gives a concrete pointsdef example, and notes the default variable and particle filters. This fully compensates for the empty schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The opening sentence 'MeasureTool: interpolate SPH values at points -> CSV time series' names a specific verb, resource, and output format. It also ties the tool into the dam-break validation workflow, distinguishing it from siblings like validate_dambreak and partvtk.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives a concrete when-to-use scenario: for dam-break validation, use a horizontal line of points just above the bottom, with density as the default variable. It explains the resulting surge front behavior and how validate_dambreak consumes it, but it never explicitly states when not to use this tool or how it compares to siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
partvtkA
PartVTK: convert Part_*.bi4 particle files to VTK for visualisation.
Args: job_id: Job whose data/ directory holds the Part_*.bi4 files. dirdata: Explicit particle data directory (alternative to job_id). savevtk: Output prefix (default particles/PartFluid inside the job). onlytype: Particle filter (default fluid only). variables: Variables to store, e.g. "+idp,+vel,+rhop,+press". first/last: Part index range. extra_args: Extra PartVTK flags.
| Name | Required | Description | Default |
|---|---|---|---|
| last | No | ||
| first | No | ||
| job_id | No | ||
| dirdata | No | ||
| savevtk | No | particles/PartFluid | |
| onlytype | No | -all,fluid | |
| variables | No | ||
| extra_args | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| command | Yes | |
| csv_files | No | |
| next_step | No | |
| vtk_files | No | |
| duration_s | No | |
| file_count | No | |
| returncode | Yes | |
| stderr_tail | No | |
| stdout_tail | No | |
| output_files | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It does reveal the output destination (savevtk default), the filtering behavior (onlytype default fluid only), and the write intent (produces VTK). But it does not disclose whether input .bi4 files are preserved, how filters interact, or error/edge-case behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The purpose sentence is front-loaded and the parameter list gives each argument a single efficient line. Compact enough that every line earns its place, though a dense arg-list format is slightly less scannable than prose for an agent.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With an output schema present, return values need no further explanation. The description covers purpose and all parameters. Minor gap: it doesn't clarify that job_id and dirdata are mutually exclusive alternatives with neither strictly required, nor whether at least one must be supplied for successful invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description fully compensates by documenting all 8 parameters with meaningful detail: relationships (dirdata as alternative to job_id), defaults (savevtk, onlytype), example values (variables '+idp,+vel,+rhop,+press'), and semantics (first/last as index range, onlytype as filter). Every parameter gains meaning beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (convert), a concrete input resource (Part_*.bi4 particle files), and an output format (VTK for visualisation). The purpose is unambiguous and clearly distinguishes it from siblings like gencase, run_case, and job_status, none of which perform file conversion.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The 'for visualisation' clause gives context for when the tool applies, and the sibling set makes the conversion role obvious. However, there is no explicit when-to-use guidance, no exclusions, and no mention of dependencies such as requiring a completed run_case/job_status before conversion is possible.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
run_caseA
Start the CPU solver in the BACKGROUND and return a job_id.
The case must have been processed by gencase first (Case.xml + Case.bi4). Progress is tracked with job_status; outputs land in the job directory (Run.out, data/Part_*.bi4). Restart/cancel are not implemented; solver flags such as -partbegin: can be passed via extra_args.
Args: case_path: Processed case base (gencase out_xml, with/without .xml). dirout: Output directory (default: jobs/). omp_threads: OpenMP threads (default: DSPH_OMP_THREADS or all cores). tmax: Override TimeMax (seconds of simulated time). tout: Override TimeOut (seconds between Part files). extra_args: Extra solver flags (e.g. ["-svres"]).
| Name | Required | Description | Default |
|---|---|---|---|
| tmax | No | ||
| tout | No | ||
| dirout | No | ||
| case_path | Yes | ||
| extra_args | No | ||
| omp_threads | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| pid | Yes | |
| case | Yes | |
| state | Yes | |
| dirout | Yes | |
| job_id | Yes | |
| command | Yes | |
| run_out | Yes | Progress log parsed by job_status |
| data_dir | Yes | Where Part_*.bi4 files appear |
| poll_hint | Yes | |
| returncode | No | |
| started_at | Yes | |
| stderr_log | Yes | |
| stdout_log | Yes | |
| finished_at | No | |
| omp_threads | Yes | |
| stderr_tail | No | |
| restart_note | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden and does so well. It discloses that execution is backgrounded, that a job_id is returned, where outputs land, that restart/cancel are unsupported, and how solver flags can be passed via extra_args.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core purpose, then gives concise behavioral context and a structured Args list. Every sentence earns its place, and the parameter list is easy to scan.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 6-parameter tool with no annotations and an output schema present, the description covers the important workflow context: prerequisites, output locations, defaults, and limitations. An agent can call this tool correctly with the information provided.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate, and it does. Every parameter is explained with its meaning, defaults, and an example for extra_args. This adds substantial value beyond the raw JSON schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
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: 'Start the CPU solver in the BACKGROUND and return a job_id.' It clearly distinguishes run_case from siblings like gencase (preprocessing) and job_status (tracking progress).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly states the prerequisite of running gencase first and points to job_status for progress tracking. It also notes that restart/cancel are not implemented, giving useful exclusions. It does not explicitly name alternatives or say 'use this when X', but 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.
validate_dambreakA
Validate a 2D dam-break run: dam-tip front vs Koshizuka & Oka (1996).
Reads the CSV produced by measure_tool with the SAME points definition (columns map to points by order), reconstructs the front position per output time (furthest point above the wetness threshold) and reports per-time errors plus MAE / RMSE / max error in metres and as % of the column length.
Args: csv_path: MeasureTool time-history CSV. points: Points [[x, y, z], ...] in CSV column order. points_file: The points file used for the measurement. threshold: Wetness threshold (500 kg/m^3 for rhop; ~0.05 for vel). column_length: Water column length a in metres (normalisation). experiment: Embedded experiment (koshizuka1996). max_time: Ignore simulated samples beyond this time (s).
| Name | Required | Description | Default |
|---|---|---|---|
| points | No | ||
| csv_path | Yes | ||
| max_time | No | ||
| threshold | No | ||
| experiment | No | koshizuka1996 | |
| points_file | No | ||
| column_length | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| mae_m | Yes | |
| notes | No | |
| rmse_m | Yes | |
| n_samples | Yes | |
| threshold | Yes | |
| experiment | Yes | |
| front_series | Yes | |
| impact_time_s | No | When the front plateaued at the tank end (wall impact), if it did |
| column_length_m | Yes | |
| max_abs_error_m | Yes | |
| mae_pct_of_column | Yes | |
| experiment_reference | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations available, the description carries the full burden and discloses the algorithm: it reconstructs front position per output time as the furthest point above the wetness threshold, then reports per-time errors, MAE, RMSE, and max error in metres and as % of column length. It also reveals the column-order mapping and the max_time filtering behavior, giving an agent a concrete model of what happens when invoked.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with purpose, then a terse method sentence, then a compact Args block. Each line carries distinct information, and no filler or repetition of schema defaults is present.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a seven-parameter validation tool with no annotations and no schema descriptions, the description explains how the CSV, points, points_file, threshold, column_length, experiment, and max_time all interact. The presence of an output schema covers return structure, so the missing output details do not create a practical gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage, but the Args list fully compensates: csv_path is identified as the MeasureTool history CSV, points are given an exact shape and ordering, threshold gets concrete reference values (500 kg/m^3 for rhop; ~0.05 for vel), and column_length is explained as normalisation. This is above and beyond the raw JSON schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The first sentence names a specific verb ('Validate'), a specific resource ('a 2D dam-break run'), and the comparison benchmark ('dam-tip front vs Koshizuka & Oka (1996)'). This clearly separates it from sibling tools like measure_tool, which produces the input CSV rather than validating it.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description says the tool 'Reads the CSV produced by measure_tool with the SAME points definition', which makes the prerequisite workflow and relation to a sibling explicit. It does not state explicit exclusions or alternative conditions, but the intended post-measurement use is clear enough.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
7 tool updates
v0.1.1- First observed
check_environment - First observed
gencase - First observed
job_status - First observed
measure_tool - First observed
partvtk - First observed
run_case - First observed
validate_dambreak
TDQS
Scored across 7 tools
Each tool targets a distinct stage of the DualSPHysics workflow (environment check, case generation, execution, polling, conversion, measurement, validation). No overlap in purpose; even validate_dambreak and measure_tool are clearly separated (measure produces CSV, validate analyzes it).
Mostly consistent snake_case with verb_noun pattern (validate_dambreak, check_environment, run_case, measure_tool). Minor deviations: partvtk and gencase lack underscores, and job_status is noun_verb rather than verb_noun, but overall the pattern is predictable and readable.
Seven tools cover the entire simulation lifecycle for a focused domain (dam-break validation). The count is well-scoped and each tool clearly earns its place; no bloat or deficiency.
The core workflow is covered end-to-end: generate case, run solver, monitor status, measure quantities, validate against experiment, and visualize results. Minor gaps include lack of job restart/cancel and no handling of wave generation, but these are acknowledged limitations rather than missing essential steps for the stated dam-break use case.
Maintenance
Related MCP Connectors
Physics-based validation of simulation results: receipts with per-check verdicts, via MCP.
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Engineering calculation MCP server for oil and gas engineering applications.
MCP server for aerospace calculations: orbital mechanics, ephemeris, DSN operations, ...
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAutomates Ansys Fluent simulation workflows, enabling environment checks, case execution, UDF management, and result export through MCP tools.4MIT
- FlicenseAqualityDmaintenanceProvides aerodynamic analysis tools through MCP, enabling geometry generation, meshing, CFD solving, and visualization for 2D airfoils.7-
- AlicenseNot gradedqualityAmaintenanceAutomates OpenFOAM CFD simulations via MCP, enabling AI agents to mesh, run, and post-process cases from natural language prompts without any API keys.MIT

Ansys CFX-MCPofficial
AlicenseAqualityAmaintenanceAn MCP server that enables AI assistants to interact with Ansys CFX through PyCFX, supporting natural-language-assisted CFX-Pre, CFX Solver, and CFD-Post workflows for setup, execution, and postprocessing.7344 PyPIApache 2.0